# # add_file "tests/t_ambiguous_tags.at" # # add_file "tests/t_kill_tag_locally.at" # # patch "ChangeLog" # from [4f2aec1f6296c4f1096475afacbd15c51e0643a3] # to [253d85e60c0a001987b673b7884424f6be9b7a6f] # # patch "tests/t_ambiguous_tags.at" # from [] # to [de01b6e6641e896d423ac223cbfdebfe8ccd5dfe] # # patch "tests/t_kill_tag_locally.at" # from [] # to [b091837656ce01a0b6ecf80706725d3251e00abf] # # patch "testsuite.at" # from [62c20553701e7f00af1169128b1fd86af4151a88] # to [35beb1e1f80eab0411f3bd2783d34a989062e82c] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,9 @@ +2005-07-13 Nathaniel Smith + + * tests/t_kill_tag_locally.at, tests/t_ambiguous_tags.at: New + tests. + * testsuite.at: Add them. + 2005-07-11 graydon hoare * AUTHORS: Add Jordan. --- tests/t_ambiguous_tags.at +++ tests/t_ambiguous_tags.at @@ -0,0 +1,21 @@ +AT_SETUP([ls tags with ambiguous tags]) +MONOTONE_SETUP + +ADD_FILE(testfile, [blah blah +]) +COMMIT(testbranch) +R1=`BASE_REVISION` + +SET_FILE(testfile, [foo foo +]) +COMMIT(testbranch) +R2=`BASE_REVISION` + +AT_CHECK(MONOTONE tag $R1 ambig_tag, [], [ignore], [ignore]) +AT_CHECK(MONOTONE tag $R2 ambig_tag, [], [ignore], [ignore]) + +AT_CHECK(MONOTONE ls tags, [], [stdout], [ignore]) +AT_CHECK(grep -q $R1 stdout) +AT_CHECK(grep -q $R2 stdout) + +AT_CLEANUP --- tests/t_kill_tag_locally.at +++ tests/t_kill_tag_locally.at @@ -0,0 +1,63 @@ +AT_SETUP([db kill_tag_locally]) +MONOTONE_SETUP + +ADD_FILE(testfile, [blah blah +]) +COMMIT(testbranch) +R1=`BASE_REVISION` + +SET_FILE(testfile, [foo foo +]) +COMMIT(testbranch) +R2=`BASE_REVISION` + +SET_FILE(testfile, [bar bar +]) +COMMIT(testbranch) +R3=`BASE_REVISION` + +SET_FILE(testfile, [baz baz +]) +COMMIT(testbranch) +R4=`BASE_REVISION` + +AT_CHECK(MONOTONE tag $R1 ambig_tag, [], [ignore], [ignore]) +AT_CHECK(MONOTONE tag $R2 ambig_tag, [], [ignore], [ignore]) +AT_CHECK(MONOTONE tag $R3 test_tag, [], [ignore], [ignore]) +AT_CHECK(MONOTONE tag $R4 other_tag, [], [ignore], [ignore]) + +AT_CHECK(MONOTONE ls tags, [], [stdout], [ignore]) +AT_CHECK(grep -q $R1 stdout, []) +AT_CHECK(grep -q ambig_tag stdout, []) +AT_CHECK(grep -q $R2 stdout, []) +AT_CHECK(grep -q ambig_tag stdout, []) +AT_CHECK(grep -q $R3 stdout, []) +AT_CHECK(grep -q test_tag stdout, []) +AT_CHECK(grep -q $R4 stdout, []) +AT_CHECK(grep -q other_tag stdout, []) + +AT_CHECK(MONOTONE db kill_tag_locally test_tag, [], [ignore], [ignore]) + +AT_CHECK(MONOTONE ls tags, [], [stdout], [ignore]) +AT_CHECK(grep -q $R1 stdout, []) +AT_CHECK(grep -q ambig_tag stdout, []) +AT_CHECK(grep -q $R2 stdout, []) +AT_CHECK(grep -q ambig_tag stdout, []) +AT_CHECK(grep -q $R3 stdout, [1]) +AT_CHECK(grep -q test_tag stdout, [1]) +AT_CHECK(grep -q $R4 stdout, []) +AT_CHECK(grep -q other_tag stdout, []) + +AT_CHECK(MONOTONE db kill_tag_locally ambig_tag, [], [ignore], [ignore]) + +AT_CHECK(MONOTONE ls tags, [], [stdout], [ignore]) +AT_CHECK(grep -q $R1 stdout, [1]) +AT_CHECK(grep -q ambig_tag stdout, [1]) +AT_CHECK(grep -q $R2 stdout, [1]) +AT_CHECK(grep -q ambig_tag stdout, [1]) +AT_CHECK(grep -q $R3 stdout, [1]) +AT_CHECK(grep -q test_tag stdout, [1]) +AT_CHECK(grep -q $R4 stdout, []) +AT_CHECK(grep -q other_tag stdout, []) + +AT_CLEANUP --- testsuite.at +++ testsuite.at @@ -669,3 +669,5 @@ m4_include(tests/t_netsync_read_permissions.at) m4_include(tests/t_netsync_exclude.at) m4_include(tests/t_netsync_exclude_default.at) +m4_include(tests/t_ambiguous_tags.at) +m4_include(tests/t_kill_tag_locally.at)