Skip to content

Commit 8b26244

Browse files
authored
feat: print test text when the test fails (#1927)
Adds the following changes to copy tests: - print the body of the test if the test fails - add a count of how many tests passed out of the total - remove the -r flag from the tests
1 parent 134a1f1 commit 8b26244

21 files changed

Lines changed: 38 additions & 112 deletions

tests/copytests/cases/test031.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/copytests/cases/test032.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# copy an empty directory to a non-existing directory with -r flag
1+
# copy an empty directory to a non-existing directory
22
# ensure the empty directory is copied to one with the new name
33

44
set -e
55
cd "$HOME/testcp"
66
mkdir foo
77

8-
wsh file copy -r foo bar
8+
wsh file copy foo bar
99

1010
if [ ! -d bar ]; then
1111
echo "bar does not exist"

tests/copytests/cases/test033.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/copytests/cases/test034.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# copy an empty directory ending with / to a non-existing directory with -r flag
1+
# copy an empty directory ending with / to a non-existing directory
22
# ensure the copy succeeds and the new directory exists
33

44
set -e
55
cd "$HOME/testcp"
66
mkdir bar
77

8-
wsh file copy -r bar/ baz
8+
wsh file copy bar/ baz
99
if [ ! -d baz ]; then
1010
echo "baz does not exist"
1111
exit 1

tests/copytests/cases/test035.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/copytests/cases/test036.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# copy an empty directory to a non-existing directory ending with / with -r flag
1+
# copy an empty directory to a non-existing directory ending with /
22
# ensure the copy succeeds and the new directory exists
33

44
set -e
55
cd "$HOME/testcp"
66
mkdir bar
77

8-
wsh file copy -r bar baz/
8+
wsh file copy bar baz/
99

1010
if [ ! -d baz ]; then
1111
echo "baz does not exist"

tests/copytests/cases/test037.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# copy an empty directory ending with // to a non-existing directory with -r flag
1+
# copy an empty directory ending with // to a non-existing directory
22
# ensure the copy succeeds and the new directory exists
33

44
set -e
55
cd "$HOME/testcp"
66
mkdir bar
77

8-
wsh file copy -r bar// baz
8+
wsh file copy bar// baz
99

1010
if [ ! -d baz ]; then
1111
echo "baz does not exist"

tests/copytests/cases/test038.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# copy an empty directory to a non-existing directory ending with // with -r flag
1+
# copy an empty directory to a non-existing directory ending with //
22
# ensure the copy succeeds and the new directory exists
33

44
set -e
55
cd "$HOME/testcp"
66
mkdir bar
77

8-
wsh file copy -r bar baz//
8+
wsh file copy bar baz//
99

1010
if [ ! -d baz ]; then
1111
echo "baz does not exist"

tests/copytests/cases/test039.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/copytests/cases/test040.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# copy a directory containing a file to a new directory with -r flag
1+
# copy a directory containing a file to a new directory
22
# ensure this succeeds and the new files exist
33

44
set -e
55
cd "$HOME/testcp"
66
mkdir bar
77
touch bar/foo.txt
88

9-
wsh file copy -r bar baz
9+
wsh file copy bar baz
1010

1111
if [ ! -f baz/foo.txt ]; then
1212
echo "baz/foo.txt does not exist"

0 commit comments

Comments
 (0)