Skip to content

Commit 66bf47c

Browse files
test: print output before the error message
Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
1 parent 4a4f4e8 commit 66bf47c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_cli.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ test_parse_nytimes_shell() {
233233
# Verify we got substantial content
234234
local output_length=${#output}
235235
if [[ $output_length -le 100 ]]; then
236-
echo "FAIL: Expected significant text content from NYTimes, got only $output_length characters"
237236
echo "Output was: '''\n$output\n'''\n===End of captured output==="
237+
echo "FAIL: Expected significant text content from NYTimes, got only $output_length characters"
238238
return 1
239239
fi
240240

@@ -248,27 +248,27 @@ test_ddg_search_nvidia() {
248248

249249
if ! output=$(timeout 120s zsh -c "$cmd | cat -"); then
250250
local exit_code=$?
251+
echo "Output was: '''\n$output\n'''\n===End of captured output==="
251252
if [[ $exit_code -eq 124 ]]; then
252253
echo "FAIL: DDG search command timed out"
253254
else
254255
echo "FAIL: DDG search command failed with exit code $exit_code"
255256
fi
256-
echo "Output was: '''\n$output\n'''\n===End of captured output==="
257257
return 1
258258
fi
259259

260260
# Check that we got some output
261261
local output_length=${#output}
262262
if [[ $output_length -le 100 ]]; then
263-
echo "FAIL: Expected substantial output from DDG search, got only $output_length characters"
264263
echo "Output was: '''\n$output\n'''\n===End of captured output==="
264+
echo "FAIL: Expected substantial output from DDG search, got only $output_length characters"
265265
return 1
266266
fi
267267

268268
# Should contain the testing model's standard response
269269
if ! echo "$output" | grep -q "Lorem ipsum dolor sit amet"; then
270-
echo "FAIL: Output did not contain expected testing string"
271270
echo "Output was: '''\n$output\n'''\n===End of captured output==="
271+
echo "FAIL: Output did not contain expected testing string"
272272
return 1
273273
fi
274274

0 commit comments

Comments
 (0)