Skip to content

Commit

Permalink
Merge pull request #40 from ErwannLesech/funct_test
Browse files Browse the repository at this point in the history
test<funct_test>: Adding new syntax error tests
  • Loading branch information
majerugo authored Jan 13, 2024
2 parents dc81057 + a89d272 commit c7b192a
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/error/error_syntax/error_syntax10.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-e toto tata if

' toto
2 changes: 2 additions & 0 deletions tests/error/error_syntax/error_syntax11.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-E echo
tata ; titi ' -E
2 changes: 2 additions & 0 deletions tests/error/error_syntax/error_syntax12.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-n elif toto -n fi
' else -n
2 changes: 2 additions & 0 deletions tests/error/error_syntax/error_syntax13.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-n
elif echo else titi tata fi tata
4 changes: 4 additions & 0 deletions tests/error/error_syntax/error_syntax4.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-e
if
fi -la echo fi -n

2 changes: 2 additions & 0 deletions tests/error/error_syntax/error_syntax5.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

ls # tata ' # ' titi echo
2 changes: 2 additions & 0 deletions tests/error/error_syntax/error_syntax6.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-la fi toto echo ; tata echo
if -e
1 change: 1 addition & 0 deletions tests/error/error_syntax/error_syntax7.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
; -la ' if if ; ' titi
Empty file.
2 changes: 2 additions & 0 deletions tests/error/error_syntax/error_syntax9.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-la -E -la
tata if -E ls '
3 changes: 3 additions & 0 deletions tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

if ref_res.returncode != res.returncode:
error += 1
f = open("test_err.txt", "a")
f.write('"' + str + '"\n')
f.close()
# print("=== Error return code ===")
# print("Input: " + str)
# print("")
Expand Down

0 comments on commit c7b192a

Please sign in to comment.