]> diplodocus.org Git - nmh/commitdiff
Expanded allowed text in mhical parse error message.
authorDavid Levine <levinedl@acm.org>
Sun, 20 Sep 2020 15:48:40 +0000 (11:48 -0400)
committerDavid Levine <levinedl@acm.org>
Sun, 20 Sep 2020 15:48:40 +0000 (11:48 -0400)
Thanks to Eric for reporting that BSD yacc produced a different
error message than bison.

test/mhical/test-mhical

index 7b75789..cd77a49 100755 (executable)
@@ -955,10 +955,6 @@ At: Sun, 14 May 2017 13:00 +0000
 To: Sun, 14 May 2017 14:00
 EOF
 
 To: Sun, 14 May 2017 14:00
 EOF
 
-cat >"$expected_err" <<'EOF'
-mhical: syntax error, unexpected ICAL_COMMA, expecting ICAL_COLON after " this line is not folded"
-EOF
-
 set +e
 printf %s \
 "BEGIN:VCALENDAR
 set +e
 printf %s \
 "BEGIN:VCALENDAR
@@ -975,7 +971,8 @@ END:VEVENT
 END:VCALENDAR" | TZ=UTC mhical >"$actual" 2>"$actual_err"
 set -e
 check "$expected" "$actual"
 END:VCALENDAR" | TZ=UTC mhical >"$actual" 2>"$actual_err"
 set -e
 check "$expected" "$actual"
-check "$expected_err" "$actual_err"
+grep "mhical: syntax error.*this line is not folded\"" "$actual_err" >/dev/null
+test `wc -l <"$actual_err"` -eq 1
 
 
 # check null input
 
 
 # check null input