diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-09-01 07:51:45 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-09-01 07:51:45 +0000 |
commit | 3eeab89ddcaa563a316092c1a20df3d67ce2d456 (patch) | |
tree | 98fd75e2f35e73a013ca6d68c819c55f10e4fc4b /test | |
parent | c72f7fdb37891d32a75c91348e8cd4f50da661f0 (diff) |
(refs #3)
Use CopyFile to copy on Windows, instead of shelling out to cp, which
doesn't understand native paths.
Diffstat (limited to 'test')
-rw-r--r-- | test/backupdiff/testbackupdiff.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/backupdiff/testbackupdiff.cpp b/test/backupdiff/testbackupdiff.cpp index b000e88d..9daa916e 100644 --- a/test/backupdiff/testbackupdiff.cpp +++ b/test/backupdiff/testbackupdiff.cpp @@ -213,10 +213,18 @@ void test_diff(int from, int to, int new_blocks_expected, int old_blocks_expecte } else { +#ifdef WIN32 + // Emulate the above stage! + char src[256], dst[256]; + sprintf(src, "testfiles\\f%d.diff", to); + sprintf(dst, "testfiles\\f%d.encoded", to); + TEST_THAT(CopyFile(src, dst, FALSE) != 0) +#else // Emulate the above stage! char cmd[256]; sprintf(cmd, "cp testfiles/f%d.diff testfiles/f%d.encoded", to, to); ::system(cmd); +#endif } // Decode it |