diff options
author | Tom Whipple <tw@tomwhipple.com> | 2006-07-20 18:58:21 +0000 |
---|---|---|
committer | Tom Whipple <tw@tomwhipple.com> | 2006-07-20 18:58:21 +0000 |
commit | d68713ea212adde669f9727c2199c908d6d41738 (patch) | |
tree | 72044a0f4654fe31dcd0f2885e9e97c23c4c7a15 | |
parent | 25c88d83ce7d827d26790e792690874bdd24806f (diff) |
more email tests
-rwxr-xr-x | tests/xdg-email/t.email_mix_args_uri | 30 | ||||
-rwxr-xr-x | tests/xdg-email/t.email_uri | 2 | ||||
-rwxr-xr-x | tests/xdg-email/t.email_uri_multi_address | 30 |
3 files changed, 60 insertions, 2 deletions
diff --git a/tests/xdg-email/t.email_mix_args_uri b/tests/xdg-email/t.email_mix_args_uri new file mode 100755 index 0000000..e99bb2d --- /dev/null +++ b/tests/xdg-email/t.email_mix_args_uri @@ -0,0 +1,30 @@ +#!/bin/bash + +## Include utility functions. +. "$XDG_TEST_DIR/include/testassertions.sh" +. "$XDG_TEST_DIR/include/testcontrol.sh" + +## Test function +test_email_mix_args_uri() { +test_start "$FUNCTNAME: verify an email is generated correctly when called with both a uri and not." + +ADDR="$XDG_TEST_ID@portland.freedesktop.org" + +test_init + +## Require a running X server +assert_display + +test_procedure + +assert_exit 0 xdg-email --cc "ccarg-$ADDR" --subject "Subject arg" "mailto:$ADDR?cc=ccuri-$ADDR&body=Body URI" "t2-$ADDR" + +assert_nostdout +assert_nostderr + +assert_interactive "Did a new email open with To/CC/Subject/Body fields complete?" y + +test_result +} + +run_test test_email_mix_args_uri diff --git a/tests/xdg-email/t.email_uri b/tests/xdg-email/t.email_uri index bd359bb..667b713 100755 --- a/tests/xdg-email/t.email_uri +++ b/tests/xdg-email/t.email_uri @@ -17,9 +17,7 @@ assert_display test_procedure -set -x assert_exit 0 xdg-email "mailto:$ADDR?subject=Test%20Subject&cc=cc-$ADDR&body=Test%20Body" -set +x assert_nostdout assert_nostderr diff --git a/tests/xdg-email/t.email_uri_multi_address b/tests/xdg-email/t.email_uri_multi_address new file mode 100755 index 0000000..b1ba9a7 --- /dev/null +++ b/tests/xdg-email/t.email_uri_multi_address @@ -0,0 +1,30 @@ +#!/bin/bash + +## Include utility functions. +. "$XDG_TEST_DIR/include/testassertions.sh" +. "$XDG_TEST_DIR/include/testcontrol.sh" + +## Test function +test_email_uri_multi_address() { +test_start "$FUNCTNAME: verify uri email compose" + +ADDR="$XDG_TEST_ID@portland.freedesktop.org" + +test_init + +## Require a running X server +assert_display + +test_procedure + +assert_exit 0 xdg-email "mailto:$ADDR?to=t2-$ADDR&subject=Test%20Subject&cc=cc-$ADDR&cc2-$ADDR&body=Test%20Body" + +assert_nostdout +assert_nostderr + +assert_interactive "Did a new email open with two addresses in the To/CC fields and the Subject/Body fields complete?" y + +test_result +} + +run_test test_email_uri_multi_address |