File: dbg-test2.sh

package info (click to toggle)
bashdb 4.0.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,820 kB
  • ctags: 942
  • sloc: sh: 10,581; lisp: 885; makefile: 449; ansic: 325
file content (38 lines) | stat: -rwxr-xr-x 475 bytes parent folder | download | duplicates (2)
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
#!../../bash
# -*- shell-script -*-
# Note: no CVS Id line since it would mess up regression testing.
# This code is used for various debugger testing.

fn1() {
    echo "fn1 here"
    x=5
    fn3
}    

fn2() {
    name="fn2"
    echo "$name here"
    x=6
}    

fn3() {
    name="fn3"
    x=$1
}    

# Test that set -xv doesn't trace into the debugger.
set -xv
x=24
x=25
for i in 0 1 3 ; do
  ((x += i))
done
set +xv
x=27
y=b
x=29
echo $(fn3 30)
fn3 31
fn1;
fn3 33
exit 0