1.1 --- a/test_all.sh Mon Jan 09 19:16:15 2017 +0100
1.2 +++ b/test_all.sh Mon Jan 09 20:01:19 2017 +0100
1.3 @@ -6,7 +6,8 @@
1.4 # Expect failure from the "bad" tests.
1.5
1.6 expect_failure() {
1.7 - return `echo "$FILENAME" | grep -q '_bad[._]'`
1.8 + echo "$FILENAME" | grep -q '_bad[._/]'
1.9 + return $?
1.10 }
1.11
1.12 # Check deduction output for type warnings, indicating that the program contains
1.13 @@ -65,7 +66,7 @@
1.14
1.15 echo "$FILENAME..." 1>&2
1.16 if ! "$LPLC" -c -r "$FILENAME" ; then
1.17 - if ! expect_failure; then
1.18 + if ! expect_failure ; then
1.19 exit 1
1.20 else
1.21 echo 1>&2
2.1 --- a/tests/listcomp.py Mon Jan 09 19:16:15 2017 +0100
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,4 +0,0 @@
2.4 -def f(l, y):
2.5 - return [x for x in l if x > y]
2.6 -
2.7 -result = f([1, 2, 3], 2)
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/tests/listcomp_bad.py Mon Jan 09 20:01:19 2017 +0100
3.3 @@ -0,0 +1,4 @@
3.4 +def f(l, y):
3.5 + return [x for x in l if x > y]
3.6 +
3.7 +result = f([1, 2, 3], 2)