mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
test: gdb insert: redirect input inside gdb script
Running `gdb command < input` is not as reliable way to give input to the command (some installations of gdb consume it). Use "set args" gdb command to have input redirected at gdb 'run' time.
This commit is contained in:
parent
636367b4cf
commit
27e293f653
1 changed files with 6 additions and 4 deletions
|
@ -202,13 +202,15 @@ end
|
||||||
run
|
run
|
||||||
EOF
|
EOF
|
||||||
test_begin_subtest "error exit when add_message returns $code"
|
test_begin_subtest "error exit when add_message returns $code"
|
||||||
gdb --batch-silent --return-child-result -x index-file-$code.gdb \
|
gdb --batch-silent --return-child-result \
|
||||||
--args notmuch insert < $gen_msg_filename
|
-ex "set args insert < $gen_msg_filename" \
|
||||||
|
-x index-file-$code.gdb notmuch
|
||||||
test_expect_equal $? 1
|
test_expect_equal $? 1
|
||||||
|
|
||||||
test_begin_subtest "success exit with --keep when add_message returns $code"
|
test_begin_subtest "success exit with --keep when add_message returns $code"
|
||||||
gdb --batch-silent --return-child-result -x index-file-$code.gdb \
|
gdb --batch-silent --return-child-result \
|
||||||
--args notmuch insert --keep < $gen_msg_filename
|
-ex "set args insert --keep < $gen_msg_filename" \
|
||||||
|
-x index-file-$code.gdb notmuch
|
||||||
test_expect_equal $? 0
|
test_expect_equal $? 0
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue