aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test/script/builtin')
-rw-r--r--tests/test/script/builtin/cat.test8
-rw-r--r--tests/test/script/builtin/mkdir.test22
-rw-r--r--tests/test/script/builtin/rm.test8
3 files changed, 30 insertions, 8 deletions
diff --git a/tests/test/script/builtin/cat.test b/tests/test/script/builtin/cat.test
index edde422..5049ca9 100644
--- a/tests/test/script/builtin/cat.test
+++ b/tests/test/script/builtin/cat.test
@@ -49,7 +49,13 @@ EOO
: non-existent
:
-cat in 2>- != 0 # @@ REGEX
+: Note that there is an optional trailing blank line in the regex that matches
+: the newline added by msvcrt as a part of the error description.
+:
+cat in 2>>~%EOE% != 0
+%cat: unable to print '.+[/\\]test[/\\]cat[/\\]non-existent[/\\]in': .+%
+%%?
+EOE
: empty-path
:
diff --git a/tests/test/script/builtin/mkdir.test b/tests/test/script/builtin/mkdir.test
index a8857c1..dafcd35 100644
--- a/tests/test/script/builtin/mkdir.test
+++ b/tests/test/script/builtin/mkdir.test
@@ -37,14 +37,24 @@ mkdir '' 2>"mkdir: invalid path ''" == 1
: already-exists
:
-: Test creation of an existing directory. Note that error message is
-: platform-dependent so is not checked.
+: Test creation of an existing directory.
:
-mkdir a 2>- a == 1 # @@ REGEX
+: Note that there is an optional trailing blank line in the regex that matches
+: the newline added by msvcrt as a part of the error description.
+:
+mkdir a a 2>>~%EOE% == 1
+%mkdir: unable to create directory '.+[/\\]test[/\\]mkdir[/\\]already-exists[/\\]a': .+%
+%%?
+EOE
: not-exists
:
-: Test creation of a directory with non-existent parent. Note that error
-: message is platform-dependent so is not checked.
+: Test creation of a directory with non-existent parent.
+:
+: Note that there is an optional trailing blank line in the regex that matches
+: the newline added by msvcrt as a part of the error description.
:
-mkdir a/b 2>- == 1 # @@ REGEX
+mkdir a/b 2>>~%EOE% == 1
+%mkdir: unable to create directory '.+[/\\]test[/\\]mkdir[/\\]not-exists[/\\]a[/\\]b': .+%
+%%?
+EOE
diff --git a/tests/test/script/builtin/rm.test b/tests/test/script/builtin/rm.test
index cf5d2fa..20b2b24 100644
--- a/tests/test/script/builtin/rm.test
+++ b/tests/test/script/builtin/rm.test
@@ -33,7 +33,13 @@ rm a
:
: Removing non-existing file fails.
:
-rm a 2>- == 1 # @@ REGEX
+: Note that there is an optional trailing blank line in the regex that matches
+: the newline added by msvcrt as a part of the error description.
+:
+rm a 2>>~%EOE% == 1
+%rm: unable to remove '.+[/\\]test[/\\]rm[/\\]file-not-exists[/\\]a': .+%
+%%?
+EOE
: file-not-exists-force
: