File: t.nodisplay

package info (click to toggle)
xdg-utils 1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,652 kB
  • sloc: sh: 8,244; xml: 3,474; perl: 335; makefile: 188; awk: 41
file content (35 lines) | stat: -rwxr-xr-x 545 bytes parent folder | download | duplicates (12)
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
35
#!/bin/bash

. "$XDG_TEST_DIR/include/testassertions.sh"
. "$XDG_TEST_DIR/include/testcontrol.sh"


test_nodisplay() {

test_start "$FUNCNAME: verify display is not set."

test_init

echo '#!/bin/bash' > showdisp.sh
echo '(echo "DISPLAY:($DISPLAY)")' >> showdisp.sh

chmod 755 showdisp.sh

echo "Display before: '$DISPLAY'"
set_no_display
echo "Display after: '$DISPLAY'"

test_procedure

echo "Display in procedure: '$DISPLAY'"

assert_exit 0  ./showdisp.sh
assert_stdout
assert_nostderr

cat out.stdout

test_result
}

run_test test_nodisplay