diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-04-01 12:44:46 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-04-01 12:44:46 +0000 |
commit | 906311fbbe8515c0c742eda3a525d32f8c53c00c (patch) | |
tree | a55f2aae0637f6eb75a33639746e11ebbe1c1bff /test | |
parent | 7453e503fe10e447ad852375bf2beb2aae0cd86d (diff) |
Test for restoring to a directory whose parent does not exist
(refs #3, merges [517])
Diffstat (limited to 'test')
-rw-r--r-- | test/bbackupd/testbbackupd.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp index 385269a2..58439937 100644 --- a/test/bbackupd/testbbackupd.cpp +++ b/test/bbackupd/testbbackupd.cpp @@ -1353,6 +1353,13 @@ int test_bbackupd() // Make sure you can't restore a restored directory TEST_THAT(BackupClientRestore(protocol, restoredirid, "testfiles/restore-Test1", true /* print progress dots */) == Restore_TargetExists); + // Make sure you can't restore to a nonexistant path + printf("Try to restore to a path that doesn't exist\n"); + TEST_THAT(BackupClientRestore(protocol, restoredirid, + "testfiles/no-such-path/subdir", + true /* print progress dots */) + == Restore_TargetPathNotFound); + // Find ID of the deleted directory deldirid = GetDirID(protocol, "x1", restoredirid); TEST_THAT(deldirid != 0); |