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
|
(stepping.sh:3):
for ((i=0; i<3; i++)) do print 1st loop $i done
+# Make sure autostep is off for next text
+set force off
Show stepping forces a new line is off.
+show force
Show stepping forces a new line is off.
+# Test that step+ skips multiple statements
+step+
1st loop 0
1st loop 1
1st loop 2
(stepping.sh:4):
for ((i=0; i<3; i++)) do print 2nd loop $i done
+set force on
Show stepping forces a new line is on.
+show force
Show stepping forces a new line is on.
+# Same thing - skip loop
+step
2nd loop 0
2nd loop 1
2nd loop 2
(stepping.sh:5):
for ((i=0; i<3; i++)) do print 3rd loop $i done
+# Override force
+step-
(stepping.sh:5):
print 3rd loop $i
+step-
3rd loop 0
(stepping.sh:5):
print 3rd loop $i
+# A null command should use the last step
+step-
3rd loop 1
(stepping.sh:5):
print 3rd loop $i
+step
3rd loop 2
(stepping.sh:6):
for ((i=0; i<3; i++)) do print 4th loop $i done
+# Try a null command the other way
+step+
4th loop 0
4th loop 1
4th loop 2
(stepping.sh:7):
for ((i=0; i<3; i++)) do print 5th loop $i done
+step+
5th loop 0
5th loop 1
5th loop 2
(stepping.sh:8):
for ((i=0; i<3; i++)) do print 6th loop $i done
+quit
|