| 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_open_dir() { |
| 9 |
test_start "$FUNCNAME: verify basic directory open test." |
| 10 |
|
| 11 |
test_init |
| 12 |
|
| 13 |
require_notroot |
| 14 |
|
| 15 |
## Require a running X server |
| 16 |
assert_display |
| 17 |
|
| 18 |
test_procedure |
| 19 |
|
| 20 |
assert_exit 0 xdg-open "$XDG_TEST_DIR" |
| 21 |
assert_nostdout |
| 22 |
assert_nostderr |
| 23 |
|
| 24 |
assert_interactive "Did a file browser open to $XDG_TEST_DIR?" y |
| 25 |
assert_interactive "Please close any windows opened by this test." C |
| 26 |
|
| 27 |
test_result |
| 28 |
} |
| 29 |
|
| 30 |
run_test test_open_dir |