Bug 780498 - Test that OS.File.move removes original file. r=yoric

This commit is contained in:
David Rajchenbach-Teller 2012-08-07 20:49:07 -04:00
parent 1a3910c0a8
commit 1c875c6ae5

View File

@ -192,9 +192,18 @@ function test_move_file()
ok(true, "test_move_file: Move complete"); ok(true, "test_move_file: Move complete");
// 3. Check // 3. Check that destination exists
compare_files("test_move_file", src_file_name, tmp2_file_name); compare_files("test_move_file", src_file_name, tmp2_file_name);
// 4. Check that original file does not exist anymore
let exn;
try {
OS.File.open(tmp_file_name);
} catch (x) {
exn = x;
}
ok(!!exn, "test_move_file: Original file has been removed");
ok(true, "test_move_file: Cleaning up"); ok(true, "test_move_file: Cleaning up");
OS.File.remove(tmp2_file_name); OS.File.remove(tmp2_file_name);
} }