File: use

package info (click to toggle)
python-fhs 1.2-1
  • links: PTS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 280 kB
  • sloc: python: 1,088; sh: 25; makefile: 11
file content (28 lines) | stat: -rwxr-xr-x 658 bytes parent folder | download
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
#!/bin/bash

temp="`mktemp -d`"
export XDG_CONFIG_HOME="$temp"/home/
mkdir -p $XDG_CONFIG_HOME
export XDG_RUNTIME_DIR="$temp"/run/
mkdir -p $XDG_RUNTIME_DIR
export XDG_DATA_HOME="$temp"/data/
mkdir -p $XDG_DATA_HOME
export XDG_CACHE_HOME="$temp"/data/
mkdir -p $XDG_CACHE_HOME

mkdir -p "$temp"/data/fhs-test
echo 'This is test data' > "$temp"/data/fhs-test/test-data.txt

"`dirname "$0"`"/run-test.py > "$temp"/output.txt

cat > "$temp"/correct.txt <<EOF
value of test is 'try this'
value of go is []
value of num is 28
value of verbose is False
value of mod-test is 1.5
file contents: This is test data

EOF

diff -u "$temp"/output.txt "$temp"/correct.txt