OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 |
| 3 ## Include utility functions. |
| 4 . "$XDG_TEST_DIR/include/testassertions.sh" |
| 5 . "$XDG_TEST_DIR/include/testcontrol.sh" |
| 6 |
| 7 ## Test function |
| 8 test_email_mix_args_uri() { |
| 9 test_start "$FUNCNAME: verify an email is generated correctly when called with b
oth a uri and not." |
| 10 |
| 11 ADDR="$XDG_TEST_SHORTID@portland.freedesktop.org" |
| 12 |
| 13 test_init |
| 14 |
| 15 require_notroot |
| 16 ## Require a running X server |
| 17 assert_display |
| 18 |
| 19 test_procedure |
| 20 |
| 21 assert_exit 0 xdg-email --cc "ccarg-$ADDR" --subject "Subject arg" "mailto:$ADD
R?cc=ccuri-$ADDR&body=Body%20URI" "t2-$ADDR" |
| 22 |
| 23 assert_nostdout |
| 24 assert_nostderr |
| 25 |
| 26 assert_interactive "Did an email open to both '$ADDR' and 't2-$ADDR'?" y |
| 27 assert_interactive "Are both 'ccarg-$ADDR' and 'ccuri-$ADDR' in the CC'd?" y |
| 28 assert_interactive "Is the subject 'Subject arg'?" y |
| 29 assert_interactive "Is the body 'Body URI'?" y |
| 30 |
| 31 assert_interactive "Please close any email windows opened by the test." C |
| 32 |
| 33 test_result |
| 34 } |
| 35 |
| 36 run_test test_email_mix_args_uri |
OLD | NEW |