check_template([BUILDDIR/t/tvec.t -fh tv], [2],
[tv:$3: ERROR: $4
tv:={N:\d+}: ERROR: required register `$1' not set in test `copy-$1'
-copy-$1 skipped: no tests to run
-PASSED 0 tests in 0 groups (1 skipped)
+tv:={N:\d+}: `copy-$1' skipped: erroneous test data
+copy-$1 skipped
+PASSED 0 tests (1 skipped) in 0 groups (1 skipped)
ERRORS found in input; tests may not have run correctly
],
[tvec.t: tv:$3: ERROR: $4
test_parse([char], [';';?], [';' ; = 59 = 0x3b])
test_parse([char], [';' ;?], [';' ; = 59 = 0x3b])
test_parse([char], [\"], ['"' ; = 34 = 0x22]) # "
+test_parse([char], [@%:@], ['@%:@' ; = 35 = 0x23])
test_parse([char], ['@%:@'], ['@%:@' ; = 35 = 0x23])
test_parse([char], [\n], [@%:@newline ; = '\n' = 10 = 0x0a])
[3], [syntax error: expected character but found `''])
test_parserr([char], [;],
[3], [syntax error: expected character but found `;'])
-test_parserr([char], [@%:@],
- [3], [unknown character name `@%:@'])
test_parserr([char], [';],
[3], [syntax error: expected `'' but found @%:@eol])
test_parserr([char], [\],
AT_CLEANUP
###--------------------------------------------------------------------------
-AT_SETUP([tvec type-string])
-
-test_parse([string], [foo], [foo])
-test_parse([string], [foo bar], ["foo bar"])
-test_parse([string], [foo bar], ["foo bar"])
-test_parse([string], [foo "" bar], [foobar])
-test_parse([string], [ foo bar ], ["foo bar"])
-test_parse([string], [ foo @&t@
+AT_SETUP([tvec type-text])
+
+test_parse([text], [foo], [foo])
+test_parse([text], [foo bar], ["foo bar"])
+test_parse([text], [foo bar], ["foo bar"])
+test_parse([text], [foo "" bar], [foobar])
+test_parse([text], [ foo bar ], ["foo bar"])
+test_parse([text], [ foo @&t@
bar ], ["foo bar"])
-test_parse([string], [foo @%:@nul bar], ["foo\{0}bar"])
+test_parse([text], [foo @%:@nul bar], ["foo\{0}bar"])
-test_parse([string], ["f" !repeat 2 { o } "bar"], [foobar])
-test_parse([string], ["{"!repeat 5{"abc"}"}"], ["{abcabcabcabcabc}"])
+test_parse([text], ["f" !repeat 2 { o } "bar"], [foobar])
+test_parse([text], ["{"!repeat 5{"abc"}"}"], ["{abcabcabcabcabc}"])
-test_parse([string], [!hex "f" 6f "o"], [foo])
+test_parse([text], [!hex "f" 6f "o"], [foo])
-test_parse([string], ["foo\n"], ["foo\n"])
+test_parse([text], ["foo\n"], ["foo\n"])
-test_parse([string], [foo\
+test_parse([text], [foo\
bar], [
"foo\n"
"bar"])
-test_parse([string], ["foo\
+test_parse([text], ["foo\
bar"], [foobar])
-test_parse([string], ["foo" @%:@newline "bar" @%:@newline], [
+test_parse([text], ["foo" @%:@newline "bar" @%:@newline], [
"foo\n"
"bar\n"])
-test_parserr([string], [],
+test_parserr([text], [],
[4], [syntax error: expected string but found @%:@eof])
-test_parse([string], [""], [""])
-test_parse([string], [''], [""])
+test_parse([text], [""], [""])
+test_parse([text], [''], [""])
-test_parse([string], ["f\x{6f}o"], [foo])
+test_parse([text], ["f\x{6f}o"], [foo])
AT_CLEANUP
test_parse([bytes], [!base64 AA], [00 ; .])
test_parse([bytes], [!base64 AAA], [0000 ; ..])
+test_parserr([text], [],
+ [4], [syntax error: expected string but found @%:@eof])
test_parserr([bytes], [0],
[4], [invalid hex sequence end: Excess or nonzero padding bits])
test_parserr([bytes], [!base64 A],
###--------------------------------------------------------------------------
AT_SETUP([tvec type-buffer])
-test_parse([buffer], [16], [16 B])
-test_parse([buffer], [16;?], [16 B])
-test_parse([buffer], [16 ;?], [16 B])
-test_parse([buffer], [16384], [16 kB])
-test_parse([buffer], [16777216], [16 MB])
-test_parse([buffer], [16k], [16 kB])
-test_parse([buffer], [16k;?], [16 kB])
-test_parse([buffer], [16k ;?], [16 kB])
-test_parse([buffer], [16 k], [16 kB])
-test_parse([buffer], [16 k;?], [16 kB])
-test_parse([buffer], [16 k ;?], [16 kB])
-test_parse([buffer], [16kB], [16 kB])
-test_parse([buffer], [16kB;?], [16 kB])
-test_parse([buffer], [16kB ;?], [16 kB])
-test_parse([buffer], [16 kB], [16 kB])
-test_parse([buffer], [16 kB;?], [16 kB])
-test_parse([buffer], [16 kB ;?], [16 kB])
+test_parse([buffer], [16], [16 B ; = 16 = 0x10])
+test_parse([buffer], [16;?], [16 B ; = 16 = 0x10])
+test_parse([buffer], [16 ;?], [16 B ; = 16 = 0x10])
+test_parse([buffer], [16384], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16777216], [16 MB ; = 16777216 = 0x01000000])
+test_parse([buffer], [16k], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16k;?], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16k ;?], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16 k], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16 k;?], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16 k ;?], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16kB], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16kB;?], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16kB ;?], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16 kB], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16 kB;?], [16 kB ; = 16384 = 0x4000])
+test_parse([buffer], [16 kB ;?], [16 kB ; = 16384 = 0x4000])
+
+test_parse([buffer], [16777216@4096+17],
+ [16 MB @ 4 kB + 17 B ; = 16777216 @ 4096 + 17 = 0x01000000 @ 0x1000 + 0x11])
test_parserr([buffer], [16!], [3], [invalid buffer length `16!'])
test_parserr([buffer], [16 !], [3], [invalid buffer length `16 !'])
test_parserr([buffer], [16 k!], [3], [invalid buffer length `16 k!'])
test_parserr([buffer], [16 kB!], [3], [invalid buffer length `16 kB!'])
test_parserr([buffer], [16 kB !],
- [3], [syntax error: expected end-of-line but found `!'])
+ [3], [syntax error: expected `@' but found `!'])
test_parserr([buffer], [16 EB], [3], [buffer length `16 EB' out of range])
AT_CLEANUP
check_template([BUILDDIR/t/tvec.t -fh tv], [0],
[tv:11: `crash' skipped: no connection
crash: ok (1 skipped)
-PASSED 3 tests (1 skipped) in 1 group
+PASSED ={N:\d+} tests (1 skipped) in 1 group
+])
+
+AT_CLEANUP
+
+###--------------------------------------------------------------------------
+AT_SETUP([tvec timeout])
+
+AT_DATA([tv],
+[;;; -*-conf-*-
+
+@<:@sleep@:>@
+
+time = 0.5
+z = 0
+@progress = %RUN
+@exit = killed | SIGALRM
+
+time = 0.125
+z = 1
+])
+check_template([BUILDDIR/t/tvec.t -fh tv], [0],
+[sleep: ok
+PASSED all ={N:\d+} tests in 1 group
])
AT_CLEANUP
fenum = tau
penum = alice
flags = red-fg | white-bg | bright
-string = "Hello, world!"
+text = "Hello, world!"
bytes =
2923be84 e16cd6ae 529049f1 f1bbe9eb
b3a6db3c 870c3e99 245e0d1c 06b747de