From 3eeab89ddcaa563a316092c1a20df3d67ce2d456 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 1 Sep 2006 07:51:45 +0000 Subject: (refs #3) Use CopyFile to copy on Windows, instead of shelling out to cp, which doesn't understand native paths. --- test/backupdiff/testbackupdiff.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') 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 -- cgit v1.2.3