[Box Backup-dev] COMMIT r517 - box/chris/general/test/bbackupd
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sun, 26 Feb 2006 00:28:56 +0000 (GMT)
Author: chris
Date: 2006-02-26 00:28:54 +0000 (Sun, 26 Feb 2006)
New Revision: 517
Modified:
box/chris/general/test/bbackupd/testbbackupd.cpp
Log:
* testbbackupd.cpp
- Unit test for restoring to a directory whose parent does not exist
Modified: box/chris/general/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/chris/general/test/bbackupd/testbbackupd.cpp 2006-02-26 00:28:22 UTC (rev 516)
+++ box/chris/general/test/bbackupd/testbbackupd.cpp 2006-02-26 00:28:54 UTC (rev 517)
@@ -815,6 +815,13 @@
// 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);