X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftest%2Ftest-copy.c;h=3e1607e51d53fba50cd619f65496cbb9c676ceea;hb=99af546d0ee63ac4af3f234a448d4a3b7bdcfab4;hp=d2cad08cb69c86b40b2a817d96535874b05eec32;hpb=cda134ab1eac84f874aacf8e885a07112a7fd5ce;p=elogind.git diff --git a/src/test/test-copy.c b/src/test/test-copy.c index d2cad08cb..3e1607e51 100644 --- a/src/test/test-copy.c +++ b/src/test/test-copy.c @@ -44,7 +44,7 @@ static void test_copy_file(void) { assert_se(write_string_file(fn, "foo bar bar bar foo") == 0); - assert_se(copy_file(fn, fn_copy, 0, 0644) == 0); + assert_se(copy_file(fn, fn_copy, 0, 0644, 0) == 0); assert_se(read_full_file(fn_copy, &buf, &sz) == 0); assert_se(streq(buf, "foo bar bar bar foo\n")); @@ -67,8 +67,8 @@ static void test_copy_file_fd(void) { assert_se(out_fd >= 0); assert_se(write_string_file(in_fn, text) == 0); - assert_se(copy_file_fd("/a/file/which/does/not/exist/i/guess", out_fd) < 0); - assert_se(copy_file_fd(in_fn, out_fd) >= 0); + assert_se(copy_file_fd("/a/file/which/does/not/exist/i/guess", out_fd, true) < 0); + assert_se(copy_file_fd(in_fn, out_fd, true) >= 0); assert_se(lseek(out_fd, SEEK_SET, 0) == 0); assert_se(read(out_fd, buf, sizeof(buf)) == sizeof(text) - 1);