From 0bff14977a2e4196bf4cd06481b8d0a93a563816 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 6 Aug 2018 01:34:06 +1200 Subject: Add failing test for lex-only error --- hence.c | 2 +- test/invalid-hence/foreign-01.hence | 2 ++ test/invalid-hence/foreign-01.hence.expected | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 test/invalid-hence/foreign-01.hence create mode 100644 test/invalid-hence/foreign-01.hence.expected diff --git a/hence.c b/hence.c index bc4b702..fbcb917 100644 --- a/hence.c +++ b/hence.c @@ -17,7 +17,7 @@ int main(int argc, char **argv) { // gate_init(); fd = fopen(argv[1], "r"); - + if (!fd) { perror("fopen"); return 1; diff --git a/test/invalid-hence/foreign-01.hence b/test/invalid-hence/foreign-01.hence new file mode 100644 index 0000000..264f6f4 --- /dev/null +++ b/test/invalid-hence/foreign-01.hence @@ -0,0 +1,2 @@ +`~ +# diff --git a/test/invalid-hence/foreign-01.hence.expected b/test/invalid-hence/foreign-01.hence.expected new file mode 100644 index 0000000..90cc467 --- /dev/null +++ b/test/invalid-hence/foreign-01.hence.expected @@ -0,0 +1 @@ +invalid-hence/foreign-01.hence at (1,1): Unexpected '`' -- cgit v1.1