1 | #!/usr/bin/env bash
|
2 |
|
3 | : ${LIB_OSH=stdlib/osh}
|
4 |
|
5 | source $LIB_OSH/two.sh # module under test
|
6 | source $LIB_OSH/bash-strict.sh
|
7 | source $LIB_OSH/no-quotes.sh
|
8 | source $LIB_OSH/byo-server.sh
|
9 | source $LIB_OSH/task-five.sh
|
10 |
|
11 | no-space(){
|
12 | echo hi
|
13 | }
|
14 |
|
15 | space1 (){
|
16 | echo hi
|
17 | }
|
18 |
|
19 | space2() {
|
20 | echo hi
|
21 | }
|
22 |
|
23 | space3(){ # space
|
24 | echo hi
|
25 | }
|
26 |
|
27 | space12 () {
|
28 | echo hi
|
29 | }
|
30 |
|
31 | space23() { # space
|
32 | echo hi
|
33 | }
|
34 |
|
35 | space123 () { # space
|
36 | echo hi
|
37 | }
|
38 |
|
39 | newline()
|
40 | {
|
41 | echo hi
|
42 | }
|
43 |
|
44 | newline1 ()
|
45 | {
|
46 | echo hi
|
47 | }
|
48 |
|
49 | test-bash-print-funcs() {
|
50 | local status stdout_file
|
51 |
|
52 | #set -x
|
53 | #_bash-print-funcs
|
54 | #set +x
|
55 |
|
56 | nq-redir status stdout_file \
|
57 | _bash-print-funcs
|
58 |
|
59 | diff -u $stdout_file - <<EOF
|
60 | newline
|
61 | newline1
|
62 | no-space
|
63 | space1
|
64 | space12
|
65 | space123
|
66 | space2
|
67 | space23
|
68 | space3
|
69 | test-bash-print-funcs
|
70 | EOF
|
71 | }
|
72 |
|
73 | task-five "$@"
|