# # add_file "tests/t_attr_drop.at" # # patch "ChangeLog" # from [87fb80ff0ea0918766a768e4411c33683c111f8f] # to [bde027244f4e42a7fabeefc248229a40c5085d4c] # # patch "tests/t_attr_drop.at" # from [] # to [6c25e3f9b2ed44bcafbc9c6881f457505c8b2e00] # # patch "testsuite.at" # from [ad46f27935bb196f680685cf791df03ebb29aad3] # to [4f4c221a231aa5db8d43cac0e3335b84f68fcd0c] # --- ChangeLog +++ ChangeLog @@ -9,8 +9,10 @@ behavior to not produce diffs on merges and propagates where the ancestors hve already been shown. + * tests/t_attr_drop.at: New test to check that 'attr drop' + correctly drops the given entry. * tests/t_drop_attr.at: New test, similar to t_rename_attr.at. - * testsuite.at: Add it. + * testsuite.at: Add them. 2005-04-17 Matt Johnston --- tests/t_attr_drop.at +++ tests/t_attr_drop.at @@ -0,0 +1,26 @@ +AT_SETUP([attr drop drops entries from .mt-attrs]) +MONOTONE_SETUP + +ADD_FILE(testfile, [foo bar +]) +AT_CHECK(MONOTONE attr set testfile first_key first_value, [], [ignore], [ignore]) +AT_CHECK(MONOTONE attr set testfile second_key second_value, [], [ignore], [ignore]) +AT_CHECK(MONOTONE attr get testfile, [], [stdout], [ignore]) +AT_CHECK(grep -q first_key stdout) +AT_CHECK(grep -q first_value stdout) +AT_CHECK(grep -q second_key stdout) +AT_CHECK(grep -q second_value stdout) +AT_CHECK(MONOTONE attr drop testfile first_key, [], [stdout], [ignore]) +AT_CHECK(MONOTONE attr get testfile, [], [stdout], [ignore]) +AT_CHECK(grep -q first_key stdout, [1]) +AT_CHECK(grep -q first_value stdout, [1]) +AT_CHECK(grep -q second_key stdout) +AT_CHECK(grep -q second_value stdout) +AT_CHECK(MONOTONE attr drop testfile, [], [stdout], [ignore]) +AT_CHECK(MONOTONE attr get testfile, [], [stdout], [ignore]) +AT_CHECK(grep -q first_key stdout, [1]) +AT_CHECK(grep -q first_value stdout, [1]) +AT_CHECK(grep -q second_key stdout, [1]) +AT_CHECK(grep -q second_value stdout, [1]) + +AT_CLEANUP --- testsuite.at +++ testsuite.at @@ -566,3 +566,4 @@ m4_include(tests/t_database_check_minor.at) m4_include(tests/t_db_kill_rev_locally.at) m4_include(tests/t_drop_attr.at) +m4_include(tests/t_attr_drop.at)