File: t-xdg-email.sh

package info (click to toggle)
xdg-utils 1.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,508 kB
  • sloc: sh: 7,900; xml: 3,213; perl: 274; makefile: 201; awk: 41
file content (34 lines) | stat: -rwxr-xr-x 994 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
COMMAND_TESTED=xdg-email
. ./test-lib.sh

test_that_it uses kmailservice to launch the default e-mail client in KDE3
mock kreadconfig
mock kmailservice
run kde3 xdg-email test@example.org
assert_run kmailservice mailto:test@example.org

test_that_it uses kde-open to launch the default e-mail client in KDE4
mock kreadconfig
mock kde-open
mock kmailservice
mock_output kde4-config kmailservice
run kde4 xdg-email test@example.org
assert_run kde-open mailto:test@example.org

test_that_it uses kde-open5 to launch the default e-mail client in KDE5
mock kreadconfig
mock kde-open5
mock kmailservice
mock kmailservice5
run kde5 xdg-email test@example.org
assert_run kde-open5 mailto:test@example.org

test_that_it uses run_thunderbird if default e-mail client is Thunderbird \
             in KDE5
cp mock-kreadconfig5 $BINDIR/kreadconfig5
mock thunderbird
mock kmailservice
mock kmailservice5
run kde5 xdg-email test@example.org
assert_run thunderbird -compose to=\'test@example.org,\'