File: example.only_debug

package info (click to toggle)
shellia 5.10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 792 kB
  • sloc: sh: 7,840; makefile: 34
file content (70 lines) | stat: -rwxr-xr-x 1,155 bytes parent folder | download | duplicates (4)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/dash
#        file: example.only_debug
#   copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2020)
#     license: GNU General Public License, version 3
# description: example to test debug features provided by shellia
#    see also: test.only_debug
set -e
set -u

. ./ia.debug

f()
{
  dbg "01:dbg_<>_<>"
  dbg 1 "02:dbg_<1>_<>"
  dbg 3 "03:dbg_<3>_<>"
  dbg 1 "car" "04:dbg_<1>_<car>"
  dbg 1 "cat" "05:dbg_<1>_<cat>"
  dbg 2 "car" "06:dbg_<2>_<car>"
  dbg 2 "bike" "07:dbg_<2>_<bike>"
  dbg 3 "dog" "08:dbg_<3>_<dog>"
  dbg 3 "cat" "09:dbg_<3>_<cat>"
}

echo "testing: without dbgon or dbgoff"
f

dbgon 1
echo "testing: dbgon <1>"
f

dbgon
echo "testing: dbgon"
f

dbgon 2
echo "testing: dbgon <2>"
f

dbgon 3
echo "testing: dbgon <3>"
f

dbgoff
echo "testing: dbgoff"
f

dbgon "1 car bike"
echo "testing: dbgon <1> <car bike>"
f

dbgon "1 car none bike"
echo "testing: dbgon <1> <car - bike>"
f

dbgon "2 car bike"
echo "testing: dbgon <2> <car bike>"
f

dbgon "car bike 3"
echo "testing: dbgon <3> <car bike>"
f

dbgon "dog 3 cat"
echo "testing: dbgon <3> <dog cat>"
f

dbgon "3 dog cat none"
echo "testing: dbgon <3> <dog cat ->"
f