Skip to content

Commit

Permalink
Tests for failing test line numbers implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
taavi-valjaots committed Mar 12, 2018
1 parent 0c1d229 commit 4d5a89c
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/format1/failure-line.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 1. Test if macros are replaced and tests are successful.
shelltest tests/format1/one-failing-test
>>> /.*Command [(]at line 8[)].*
.*plahh.*
.*Expected stdout.*
.*slahh.*
.*Got stdout.*
.*plahh.*/
>>>= 1
15 changes: 15 additions & 0 deletions tests/format1/one-failing-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Note that this file is called from 'failure-line.test'
# This should be fine.
echo "plahh"
>>> /plahh/
>>>= 0

# This should be broken.
echo "plahh"
>>> /slahh/
>>>= 0

# This should be fine.
echo "plahh"
>>> /plahh/
>>>= 0
9 changes: 9 additions & 0 deletions tests/format2/failure-line.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 1. Test if macros are replaced and tests are successful.
shelltest tests/format1/one-failing-test
>>> /.*Command [(]at line 8[)].*
.*plahh.*
.*Expected stdout.*
.*slahh.*
.*Got stdout.*
.*plahh.*/
>>>= 1
15 changes: 15 additions & 0 deletions tests/format2/one-failing-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Note that this file is called from 'failure-line.test'
# This should be fine.
$$$ echo "plahh"
>>> /plahh/
>>>= 0

# This should be broken.
$$$ echo "plahh"
>>> /slahh/
>>>= 0

# This should be fine.
$$$ echo "plahh"
>>> /plahh/
>>>= 0
9 changes: 9 additions & 0 deletions tests/format3/failure-line.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 1. Test if macros are replaced and tests are successful.
shelltest tests/format1/one-failing-test
>>> /.*Command [(]at line 8[)].*
.*plahh.*
.*Expected stdout.*
.*slahh.*
.*Got stdout.*
.*plahh.*/
>>>= 1
15 changes: 15 additions & 0 deletions tests/format3/one-failing-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Note that this file is called from 'failure-line.test'
# This should be fine.
$ echo "plahh"
> /plahh/
>= 0

# This should be broken.
$ echo "plahh"
> /slahh/
>= 0

# This should be fine.
$ echo "plahh"
> /plahh/
>= 0

0 comments on commit 4d5a89c

Please sign in to comment.