# # # patch "paths.cc" # from [989ff59ebe84abb8ac88e43d4a779e064b1a6d27] # to [9c1d54440bc37827f23b33f5e275406748320384] # # patch "tests/magic__MTN_in_restrictions/__driver__.lua" # from [a7a65e8fc98dedb4cc4689cb5db0a317dc5d6f8d] # to [2de41db29f4dca88d6d1ec5d3abd6936c7de8394] # ============================================================ --- paths.cc 989ff59ebe84abb8ac88e43d4a779e064b1a6d27 +++ paths.cc 9c1d54440bc37827f23b33f5e275406748320384 @@ -1292,7 +1292,7 @@ UNIT_TEST(paths, ordering) test_a_path_ordering("fallanoooo_not_otherwise_mentioned_and_smaller", "fallanopic_not_otherwise_mentioned"); } -UNIT_TESTS(paths, test_internal_string_is_bookkeeping_path) +UNIT_TEST(paths, test_internal_string_is_bookkeeping_path) { char const * yes[] = {"_MTN", "_MTN/foo", @@ -1303,13 +1303,13 @@ UNIT_TESTS(paths, test_internal_string_i 0 }; for (char const ** c = yes; *c; ++c) BOOST_CHECK(bookkeeping_path - ::internal_string_is_bookkeeping_path(utf8(std::string(c)))); + ::internal_string_is_bookkeeping_path(utf8(std::string(*c)))); for (char const ** c = no; *c; ++c) BOOST_CHECK(!bookkeeping_path - ::internal_string_is_bookkeeping_path(utf8(std::string(c)))); + ::internal_string_is_bookkeeping_path(utf8(std::string(*c)))); } -UNIT_TESTS(paths, test_external_string_is_bookkeeping_path_prefix_none) +UNIT_TEST(paths, test_external_string_is_bookkeeping_path_prefix_none) { initial_rel_path.unset(); initial_rel_path.set(fs::path(), true); @@ -1325,13 +1325,13 @@ UNIT_TESTS(paths, test_external_string_i 0 }; for (char const ** c = yes; *c; ++c) BOOST_CHECK(bookkeeping_path - ::external_string_is_bookkeeping_path(utf8(std::string(c)))); + ::external_string_is_bookkeeping_path(utf8(std::string(*c)))); for (char const ** c = no; *c; ++c) BOOST_CHECK(!bookkeeping_path - ::external_string_is_bookkeeping_path(utf8(std::string(c)))); + ::external_string_is_bookkeeping_path(utf8(std::string(*c)))); } -UNIT_TESTS(paths, test_external_string_is_bookkeeping_path_prefix_a_b) +UNIT_TEST(paths, test_external_string_is_bookkeeping_path_prefix_a_b) { initial_rel_path.unset(); initial_rel_path.set(fs::path("a/b"), true); @@ -1349,13 +1349,13 @@ UNIT_TESTS(paths, test_external_string_i 0 }; for (char const ** c = yes; *c; ++c) BOOST_CHECK(bookkeeping_path - ::external_string_is_bookkeeping_path(utf8(std::string(c)))); + ::external_string_is_bookkeeping_path(utf8(std::string(*c)))); for (char const ** c = no; *c; ++c) BOOST_CHECK(!bookkeeping_path - ::external_string_is_bookkeeping_path(utf8(std::string(c)))); + ::external_string_is_bookkeeping_path(utf8(std::string(*c)))); } -UNIT_TESTS(paths, test_external_string_is_bookkeeping_path_prefix__MTN) +UNIT_TEST(paths, test_external_string_is_bookkeeping_path_prefix__MTN) { initial_rel_path.unset(); initial_rel_path.set(fs::path("_MTN"), true); @@ -1372,10 +1372,10 @@ UNIT_TESTS(paths, test_external_string_i 0 }; for (char const ** c = yes; *c; ++c) BOOST_CHECK(bookkeeping_path - ::external_string_is_bookkeeping_path(utf8(std::string(c)))); + ::external_string_is_bookkeeping_path(utf8(std::string(*c)))); for (char const ** c = no; *c; ++c) BOOST_CHECK(!bookkeeping_path - ::external_string_is_bookkeeping_path(utf8(std::string(c)))); + ::external_string_is_bookkeeping_path(utf8(std::string(*c)))); } #endif // BUILD_UNIT_TESTS ============================================================ --- tests/magic__MTN_in_restrictions/__driver__.lua a7a65e8fc98dedb4cc4689cb5db0a317dc5d6f8d +++ tests/magic__MTN_in_restrictions/__driver__.lua 2de41db29f4dca88d6d1ec5d3abd6936c7de8394 @@ -1,7 +1,12 @@ mtn_setup() mtn_setup() +-- have to commit something, so that our restriction does not fail because it +-- doesn't include the root directory. addfile("a", "some data") +commit() +writefile("a", "other data") + check(mtn("diff", "a", "_MTN"), 0, true, true) check(not qgrep("_MTN", "stdout")) check(qgrep("_MTN", "stderr"))