]> diplodocus.org Git - nmh/blobdiff - test/mhical/test-mhical
Expanded allowed text in mhical parse error message.
[nmh] / test / mhical / test-mhical
index 768135203f4a99642beefd4a38e3081ff009a7e4..cd77a495cf588c31d959113a8082e07c3404fb49 100755 (executable)
@@ -950,15 +950,11 @@ start_test "invalid line folding"
 
 cat >"$expected" <<'EOF'
 Summary: test
 
 cat >"$expected" <<'EOF'
 Summary: test
-Description: this file does not end with a newline
+Description: test of invalid line folding
 At: Sun, 14 May 2017 13:00 +0000
 To: Sun, 14 May 2017 14:00
 EOF
 
 At: Sun, 14 May 2017 13:00 +0000
 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
@@ -969,18 +965,19 @@ DTSTAMP:20170514T122300Z
 DTSTART:20170514T130000Z
 DTEND:20170514T140000Z
 SUMMARY:test
 DTSTART:20170514T130000Z
 DTEND:20170514T140000Z
 SUMMARY:test
-DESCRIPTION:this file does not end with a newline
-and this line is not folded,
+DESCRIPTION:test of invalid line folding
+where this line is not folded,
 END:VEVENT
 END:VCALENDAR" | TZ=UTC mhical >"$actual" 2>"$actual_err"
 set -e
 check "$expected" "$actual"
 END:VEVENT
 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
 start_test "null input"
 
 
 # check null input
 start_test "null input"
-check_exit '-eq 0' mhical </dev/null
+check_exit '-eq 1' mhical </dev/null
 
 
 # check timezone boundary at transition from daylight saving time, -2SU
 
 
 # check timezone boundary at transition from daylight saving time, -2SU