test/main
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
38
39
40
41
42
43
44
45
46
47
# test function inheretence println() { printf "%s\n" "$1" } # hewo uname -a PASSTHROUGH=bananas # tests waiting for output sleep 2; printf '%s\n' hi # check all env vars env # ensure comments are ignored # ls /asfj zoa-script 2-call-me-from-anotha echo i am main # test if statements if [ "$(uname -n)" = "nostromo" ]; then echo NOSTROMO fi echo $NODENAME zoa-script 3-more cat >/tmp/trashcan <<EOF hello i am a trash can man :3 EOF printf "testing passthrough vars: %s\n" $PASSTHROUGH zoa-file demo /tmp/zoa-file-test echo $PASSTHROUGH ls /tmp/zoa-file-test # ensure that zoa-script works in an if statement if printf "%s\n" "testing if statement followed by custom helper"; then zoa-script another-thing fi # should pass ls /asdfnoexist || true ls /