Skip to content

Commit 4d5a89c

Browse files
Tests for failing test line numbers implemented.
1 parent 0c1d229 commit 4d5a89c

File tree

6 files changed

+72
-0
lines changed

6 files changed

+72
-0
lines changed

tests/format1/failure-line.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 1. Test if macros are replaced and tests are successful.
2+
shelltest tests/format1/one-failing-test
3+
>>> /.*Command [(]at line 8[)].*
4+
.*plahh.*
5+
.*Expected stdout.*
6+
.*slahh.*
7+
.*Got stdout.*
8+
.*plahh.*/
9+
>>>= 1

tests/format1/one-failing-test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Note that this file is called from 'failure-line.test'
2+
# This should be fine.
3+
echo "plahh"
4+
>>> /plahh/
5+
>>>= 0
6+
7+
# This should be broken.
8+
echo "plahh"
9+
>>> /slahh/
10+
>>>= 0
11+
12+
# This should be fine.
13+
echo "plahh"
14+
>>> /plahh/
15+
>>>= 0

tests/format2/failure-line.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 1. Test if macros are replaced and tests are successful.
2+
shelltest tests/format1/one-failing-test
3+
>>> /.*Command [(]at line 8[)].*
4+
.*plahh.*
5+
.*Expected stdout.*
6+
.*slahh.*
7+
.*Got stdout.*
8+
.*plahh.*/
9+
>>>= 1

tests/format2/one-failing-test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Note that this file is called from 'failure-line.test'
2+
# This should be fine.
3+
$$$ echo "plahh"
4+
>>> /plahh/
5+
>>>= 0
6+
7+
# This should be broken.
8+
$$$ echo "plahh"
9+
>>> /slahh/
10+
>>>= 0
11+
12+
# This should be fine.
13+
$$$ echo "plahh"
14+
>>> /plahh/
15+
>>>= 0

tests/format3/failure-line.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 1. Test if macros are replaced and tests are successful.
2+
shelltest tests/format1/one-failing-test
3+
>>> /.*Command [(]at line 8[)].*
4+
.*plahh.*
5+
.*Expected stdout.*
6+
.*slahh.*
7+
.*Got stdout.*
8+
.*plahh.*/
9+
>>>= 1

tests/format3/one-failing-test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Note that this file is called from 'failure-line.test'
2+
# This should be fine.
3+
$ echo "plahh"
4+
> /plahh/
5+
>= 0
6+
7+
# This should be broken.
8+
$ echo "plahh"
9+
> /slahh/
10+
>= 0
11+
12+
# This should be fine.
13+
$ echo "plahh"
14+
> /plahh/
15+
>= 0

0 commit comments

Comments
 (0)