| 1 |
#!/bin/bash |
| 2 |
## debian/tests/cli |
| 3 |
## Test that nqq starts and prints usual info |
| 4 |
|
| 5 |
# Create temporary work directory |
| 6 |
tmpd=$(mktemp -d) |
| 7 |
|
| 8 |
# Create a support directories for home and xdg |
| 9 |
export HOME=${tmpd}/home |
| 10 |
export XDG_RUNTIME_DIR=${tmpd}/xdg |
| 11 |
mkdir -p -m 777 ${HOME} |
| 12 |
mkdir -p -m 700 ${XDG_RUNTIME_DIR} |
| 13 |
|
| 14 |
xvfb-run -a notepadqq --version |
| 15 |
xvfb-run -a notepadqq --help |
| 16 |
xvfb-run -a notepadqq --print-debug-info 2>&1 |
| 17 |
|
| 18 |
# Sometimes xvfb doesn't exit right away, sometimes it does. Ignore exit value of pkill to accomodate -e. |
| 19 |
pkill Xvfb || : |
| 20 |
|
| 21 |
# Clean up |
| 22 |
rm -rf "${tmpd}" |