File: gui

package info (click to toggle)
notepadqq 2.0.0~beta1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,216 kB
  • sloc: javascript: 62,205; cpp: 17,647; sh: 223; xml: 36; makefile: 32
file content (37 lines) | stat: -rwxr-xr-x 700 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
35
36
37
#!/bin/bash
## debian/tests/gui
## Test that notepadqq starts graphically and prints no warnings

# Create temporary work directory
tmpd=$(mktemp -d)

# Create a support directories for home and xdg
export HOME=${tmpd}/home
export XDG_RUNTIME_DIR=${tmpd}/xdg
mkdir -p -m 777 ${HOME}
mkdir -p -m 700 ${XDG_RUNTIME_DIR}

# Create temporary log file
k=$(mktemp)

# Run nqq on a fake display
(QTWEBENGINE_CHROMIUM_FLAGS=--disable-gpu xvfb-run -a notepadqq &> ${k}) &

# Give it some time to generate warnings
sleep 5

# Close it
kill -QUIT %1
wait %1 2>/dev/null

# Count warnings
errs=$(wc -w < ${k})

cat $k

# Cleanup
pkill Xvfb
rm -rf "${tmpd}"

# Ensure that there are no warnings
[ ${errs} -eq 0 ]