aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/builtin/mkdir.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-12-17 23:28:30 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-01-05 15:30:41 +0300
commit3ecbf5d51b13e11a93ae5757408a27c21d804c9f (patch)
treebe46e3caa24574de106c2fbf1a05c43d32694e12 /tests/test/script/builtin/mkdir.test
parenta63e1809afd9a837821d6e8376cb14a36e7fc26e (diff)
Add support for regex in runner
Diffstat (limited to 'tests/test/script/builtin/mkdir.test')
-rw-r--r--tests/test/script/builtin/mkdir.test22
1 files changed, 16 insertions, 6 deletions
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