Skip to content

Commit

Permalink
test: Some fixes for test-suite
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward committed Oct 19, 2023
1 parent 8454a9a commit 2fed8c4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test

on:
push:
branches: [ testsuite ]
branches: [ main ]
pull_request:
branches: [ main ]

Expand All @@ -27,4 +27,3 @@ jobs:
run: pip install pipenv
- name: Run Testsuite
run: cd logics-py && pipenv install --dev && pipenv run pytest -vvv

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<div align="center">
<img src="https://github.com/viur-framework/viur-artwork/raw/main/icons/icon-logics.svg" height="196" alt="A hexagonal logo of Logics" title="Logics logo">
<h1>Logics</h1>
<a href="https://github.com/LeopoldWichtel/logics/actions/workflows/test.yml">
<img src="https://github.com/LeopoldWichtel/logics/actions/workflows/test.yml/badge.svg" alt="Badge displaying the test status" title="Test badge">
</a>
<a href="https://pypi.org/project/logics-py">
<img alt="Badge showing current PyPI version if logics-py" title="logics-py" src="https://img.shields.io/pypi/v/logics-py?label=logics-py">
</a>
Expand All @@ -10,10 +13,6 @@
<a href="https://github.com/viur-framework/logics/LICENSE">
<img src="https://img.shields.io/github/license/viur-framework/logics" alt="Badge displaying the license" title="License badge">
</a>
<a href="https://github.com/LeopoldWichtel/logics/actions/workflows/test.yml">
<img src="https://github.com/LeopoldWichtel/logics/actions/workflows/test.yml/badge.svg" alt="Badge displaying the test status" title="Test badge">
</a>

<br>
A tiny, sandboxed, secure and extendable formula language with a flavor of Python.
</div>
Expand Down
4 changes: 3 additions & 1 deletion tests/expressions.lgx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
1 + 2 * 3 + 4
#EXPECT:11

(1 + 2) * (3 + 4)
#EXPECT:21

3 * "HelloWorld"
#EXPECT:"HelloWorldHelloWorldHelloWorld"
#EXPECT:"HelloWorldHelloWorldHelloWorld"
8 changes: 4 additions & 4 deletions tests/if.lgx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"Ja" if 2 + 3 == 5 else "Nein"
#EXPECT:"Ja"
"Ja" if False else "Nein"
#EXPECT:"Nein"
"yes" if 2 + 3 == 5 else "no"
#EXPECT:"yes"
"yes" if False else "no"
#EXPECT:"no"
8 changes: 0 additions & 8 deletions tests/values.lgx

This file was deleted.

5 changes: 3 additions & 2 deletions tests/vars.lgx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#set:i:10
i + i
#expect:20
i * "Jan"
#expect:"JanJanJanJanJanJanJanJanJanJan"

i * "Logics"
#expect:"LogicsLogicsLogicsLogicsLogicsLogicsLogicsLogicsLogicsLogics"

0 comments on commit 2fed8c4

Please sign in to comment.