Skip to content

Commit

Permalink
Add tests for unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed May 28, 2024
1 parent abeed02 commit cb09d47
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests.list
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
./tests/real.tula,run
./tests/string.tula,run
./tests/left-tape.tula,run
./tests/double-subst.tula,ignore
./tests/double-subst.tula,ignore
./tests/unused-vars.tula,run
5 changes: 5 additions & 0 deletions tests/unused-vars.tula
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
trace . { . }

for a b in { 1 2 3 } {
case . . . . .
}
3 changes: 3 additions & 0 deletions tests/unused-vars.tula.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./tests/unused-vars.tula:4:5: ERROR: not all variables in the scope are used in the input of the case
./tests/unused-vars.tula:3:5: NOTE: unused variable a
./tests/unused-vars.tula:3:7: NOTE: unused variable b

0 comments on commit cb09d47

Please sign in to comment.