Skip to content

Commit 4637d63

Browse files
committed
fix command.exp
1 parent acdd26f commit 4637d63

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

ci/expect_scripts/command.exp

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,23 @@ source ./ci/expect_scripts/shared-code.exp
99

1010
spawn $env(EXAMPLES_DIR)command
1111

12-
expect "Hello"
13-
expect "{stderr_utf8_lossy: \"\", stdout_utf8: \"Hi"
14-
expect "\"}"
15-
expect "BAZ=DUCK"
16-
expect "FOO=BAR"
17-
expect "XYZ=ABC"
18-
expect "cat: non_existent.txt: No such file or directory"
19-
expect "Exit code: 1"
12+
set expected_output [normalize_output {
13+
Hello
14+
{ stderr_utf8_lossy: "", stdout_utf8: "Hi
15+
" }
16+
BAZ=DUCK
17+
FOO=BAR
18+
XYZ=ABC
19+
cat: non_existent.txt: No such file or directory
20+
Exit code: 1
21+
{ stderr_bytes: [], stdout_bytes: [72, 105, 10] }
22+
}]
2023

21-
expect eof {
22-
check_exit_and_segfault
24+
expect -exact $expected_output {
25+
expect eof {
26+
check_exit_and_segfault
27+
}
2328
}
2429

2530
puts stderr "\nExpect script failed: output was not as expected. Diff the output with expected_output in this script. Alternatively, uncomment `exp_internal 1` to debug."
26-
exit 1
31+
exit 1

0 commit comments

Comments
 (0)