summaryrefslogtreecommitdiffstats
path: root/dom/system/tests/ioutils/test_ioutils_copy_move.html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/system/tests/ioutils/test_ioutils_copy_move.html')
-rw-r--r--dom/system/tests/ioutils/test_ioutils_copy_move.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/dom/system/tests/ioutils/test_ioutils_copy_move.html b/dom/system/tests/ioutils/test_ioutils_copy_move.html
index 408bb82f39..0761447bc6 100644
--- a/dom/system/tests/ioutils/test_ioutils_copy_move.html
+++ b/dom/system/tests/ioutils/test_ioutils_copy_move.html
@@ -24,7 +24,7 @@
info("Test moving a file to a relative destination");
await Assert.rejects(
IOUtils.move(tmpFileName, dest),
- /Could not parse path/,
+ /OperationError: Could not move `.*' to `.*': could not parse path \(NS_ERROR_FILE_UNRECOGNIZED_PATH\)/,
"IOUtils::move only works with absolute paths"
);
ok(
@@ -56,7 +56,7 @@
// Test.
await Assert.rejects(
IOUtils.move(tmpFileName, destFileName, { noOverwrite: true }),
- /Could not move source file\(.*\) to destination\(.*\) because the destination already exists and overwrites are not allowed/,
+ /Could not move `.*' to `.*': destination file exists and `noOverwrite' is true/,
"IOUtils::move will refuse to move a file if overwrites are disabled"
);
ok(
@@ -161,7 +161,7 @@
// Test.
await Assert.rejects(
IOUtils.move(notExistsSrc, notExistsDest),
- /Could not move source file\(.*\) because it does not exist/,
+ /NotFoundError: Could not move `.*' to `.*': source file does not exist/,
"IOUtils::move throws if source file does not exist"
);
ok(
@@ -178,7 +178,7 @@
// Test.
await Assert.rejects(
IOUtils.move(srcDir, destFile),
- /Could not move the source directory\(.*\) to the destination\(.*\) because the destination is not a directory/,
+ /InvalidAccessError: Could not move directory `.*' to `.*': destination is not a directory/,
"IOUtils::move throws if try to move dir into an existing file"
);
@@ -206,7 +206,7 @@
// Test.
await Assert.rejects(
IOUtils.copy(tmpFileName, destFileName, { noOverwrite: true }),
- /Could not copy source file\(.*\) to destination\(.*\) because the destination already exists and overwrites are not allowed/,
+ /NoModificationAllowedError: Could not copy `.*' to `.*': destination file exists and `noOverwrite' is true/,
"IOUtils::copy will refuse to copy to existing destination if overwrites are disabled"
);
ok(
@@ -311,7 +311,7 @@
// Test.
await Assert.rejects(
IOUtils.copy(notExistsSrc, notExistsDest),
- /Could not copy source file\(.*\) because it does not exist/,
+ /NotFoundError: Could not copy `.*' to `.*': source file does not exist/,
"IOUtils::copy throws if source file does not exist"
);
ok(
@@ -328,8 +328,8 @@
// Test.
await Assert.rejects(
IOUtils.copy(srcDir, destFile, { recursive: true }),
- /Could not copy the source directory\(.*\) to the destination\(.*\) because the destination is not a directory/,
- "IOUtils::copy throws if try to move dir into an existing file"
+ /InvalidAccessError: Could not copy directory `.*' to `.*': destination is not a directory/,
+ "IOUtils::copy throws when trying to move a directory into an existing file"
);
ok(await fileHasTextContents(destFile, ""), "IOUtils::copy failure does not affect destination");
@@ -339,7 +339,7 @@
// Test.
await Assert.rejects(
IOUtils.copy(srcDir, notExistsDest, { recursive: false }),
- /Refused to copy source directory\(.*\) to the destination\(.*\)/,
+ /OperationError: Refused to copy directory `.*' to `.*': `recursive' is false/,
"IOUtils::copy throws if try to copy a directory with { recursive: false }"
);
console.log(`${notExistsDest} exists?`, await IOUtils.exists(notExistsDest))