Debian Codegraph @

tests/xdg-email/t.13-email_multi_address

raw
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_multi_address() {
9 test_start "$FUNCNAME: verify multiple to/cc/bcc arguments work"
10
11 addr="[email protected]"
12 TO1="to-1-$addr"
13 TO2="to-2-$addr"
14 CC1="cc-1-$addr"
15 CC2="cc-2-$addr"
16 BCC1="bcc-1-$addr"
17 BCC2="bcc-2-$addr"
18
19 test_init
20
21 require_notroot
22 ## Require a running X server
23 assert_display
24
25 test_procedure
26
27 assert_exit 0 xdg-email --cc "$CC1" --bcc "$BCC1" \
28 --cc "$CC2" --bcc "$BCC2" --subject 'I am the subject' \
29 --body 'I am the body' "$TO1" "$TO2"
30
31 assert_nostdout
32 assert_nostderr
33
34 assert_interactive "Did an email open to both '$TO1' and '$TO2'?" y
35 assert_interactive "Are both '$CC1' and '$CC2' CC'd?" y
36 assert_interactive "Are both '$BCC1' and '$BCC2' BCC'd?" y
37
38 assert_interactive "Please close any email windows opened by the test." C
39
40 test_result
41 }
42
43 repeat_test test_multi_address 1 PRE "t"