-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_std.sh
executable file
·57 lines (46 loc) · 1023 Bytes
/
test_std.sh
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
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
SELF=$(realpath $0)
SELF_PARENT=$(dirname $0)
#debug=no
#set -x
source $SELF_PARENT/std.sh
# Set true to test.
if false
then
parse_all_params $@
for i in $foo $verbose $v $debug $d $p; do
if exists $i; then
write $foo
fi
done
fi
# Set true to test.
if true
then
param switch debug $@
param switch verbose $@
param short foo $@
param long bazz $@
param shortlong hello $@
if [ "$debug" = yes ]; then
echo "*debug=$debug" ; echo foo=$foo
fi
fi
# TEST for define_parm function
if false
then
for i in switch short long 'stringlong'
do
LOCATION=$(define_param $i location "$@")
if exists $LOCATION; then echo $LOCATION; fi
done
fi
# Set true to test.
if true
then
echo
write $(basename ${BASH_SOURCE[0]}) is just a test file.
verbose $(basename ${BASH_SOURCE[0]}) is just a test file.
debug $(basename ${BASH_SOURCE[0]}) is just a test file.
error $(basename ${BASH_SOURCE[0]}) is just a test file.
fi