Skip to content

Commit a20bcfd

Browse files
committed
Fix failing test (more likely failure of expect(1) than of oicb)
1 parent 9c3ec68 commit a20bcfd

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/test-history

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44

55
run_icbd
66

7+
# For some reasons this test fails if it ends with send() instead of expect().
8+
# Either this is an oicb (timing?) bug, or failure of expect(1) - not reading
9+
# stdout from oicb.
10+
711
run_oicb user1 roomfoo <<EOE
812
set send_human { .1 .2 1 .05 0.5 }
913
expect "You are now in group roomfoo\\r\\n" { send "/m user1 test 1\\n" }
1014
expect "] \\*user1\\* test 1\\r\\n" { send "\t/m user2 test 2\\n" }
11-
expect "! No such user user2\\r\\n" { send "\\ttest 3\\ntest 4\\n"; exit 0 }
15+
expect "! No such user user2\\r\\n" { send "\\t\\ttest 3\\ntest 4\\n/m user1 test 5\n" }
16+
expect "] \\*user1\\* test 5\\r\\n" { exit 0 }
1217
exit 1
1318
EOE
1419

@@ -35,6 +40,8 @@ sed -E "s/^${ts_re} //" <"$user1_log" >"${user1_log}.stripped" || fail "sed ${us
3540
diff -u -L "user1.log.expected" -L "user1.log.actual" - "${user1_log}.stripped" <<EOF
3641
me: test 1
3742
user1: test 1
43+
me: test 5
44+
user1: test 5
3845
EOF
3946

4047
sed -E "s/^${ts_re} //" <"$user2_log" >"${user2_log}.stripped" || fail "sed ${user2_log}"

0 commit comments

Comments
 (0)