Skip to content

Commit 229515e

Browse files
committed
expand test case
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
1 parent 5e1e174 commit 229515e

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
proc foo(x) {
1+
config const myVar = 42;
2+
proc foo(x) throws {
23
if x > 0 {
34
halt("x is greater than 0");
5+
} else {
6+
throw new Error("x is not greater than 0");
47
}
58
}
69

710
proc main() {
8-
9-
foo(10);
10-
11+
foo(myVar);
1112
}
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/usr/bin/env bash
22

3-
if command -v gdb >/dev/null ; then
4-
echo "--gdb"
5-
fi
63

7-
if command -v lldb >/dev/null ; then
8-
echo "--lldb"
9-
fi
4+
for i in -5 17; do
5+
if command -v gdb >/dev/null ; then
6+
echo "--myVar=$i --gdb"
7+
fi
8+
9+
if command -v lldb >/dev/null ; then
10+
echo "--myVar=$i --lldb"
11+
fi
12+
done

test/library/standard/Debugger/breakOnHalt.prediff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
file=$2
44

5-
if grep -q -E '#1:.*chpl_error_explicit' $file; then
5+
if grep -q -E '#1:.*(chpl_error_explicit|chpl_error_preformatted)' $file; then
66
echo "Success: Found expected output" > $file
77
else
8-
echo "Failure: Expected output not found" > $file
8+
echo "Failure: Expected output not found" >> $file
99
fi

0 commit comments

Comments
 (0)