# # add_file "tests/t_annotate_renames.at" # # patch "tests/t_annotate_renames.at" # from [] # to [d4e5bae99ae78d94c788825c3507a0f9cfb5de32] # # patch "testsuite.at" # from [aa149ca88c53d7da2d15874ad10f1e4623706b5e] # to [f665775bce51321c531198d61e90fe14ba56a107] # ======================================================================== --- tests/t_annotate_renames.at +++ tests/t_annotate_renames.at d4e5bae99ae78d94c788825c3507a0f9cfb5de32 @@ -0,0 +1,56 @@ +AT_SETUP([annotate file whose name changed]) +MONOTONE_SETUP + +# This test is a bug report +AT_XFAIL_IF(true) + +ADD_FILE(foo, [a +b +c +]) + +AT_DATA(foo.rightnewname, [a +b +x +]) + +AT_DATA(foo.merged, [aa +b +x +]) + +COMMIT(testbranch) +REV0=`BASE_REVISION` + + +# do something to a file we don't care about to make a commitable change +ADD_FILE(junk, [some +junk +]) +COMMIT(testbranch) +REVL=`BASE_REVISION` + +REVERT_TO($REV0) +AT_CHECK(cp foo.rightnewname foo) +AT_CHECK(MONOTONE rename -e foo foo.new, [], [ignore], [ignore]) +COMMIT(testbranch) +REVR=`BASE_REVISION` + + +AT_CHECK(MONOTONE merge, [], [ignore], [ignore]) +AT_CHECK(MONOTONE update, [], [ignore], [ignore]) +REV1=`BASE_REVISION` + +# +# annotate foo should now be +# REV1: aa +# REV0: b +# REVR: x +# + +AT_CHECK(MONOTONE annotate foo.new, [], [stdout], [ignore]) +AT_CHECK(head -n 1 stdout | grep $REV1, [0], [ignore], [ignore]) +AT_CHECK(head -n 2 stdout | TAIL(1) | grep $REV0, [0], [ignore], [ignore]) +AT_CHECK(head -n 3 stdout | TAIL(1) | grep $REVR, [0], [ignore], [ignore]) + +AT_CLEANUP ======================================================================== --- testsuite.at aa149ca88c53d7da2d15874ad10f1e4623706b5e +++ testsuite.at f665775bce51321c531198d61e90fe14ba56a107 @@ -715,3 +715,4 @@ m4_include(tests/t_diff_outside_working_dir.at) m4_include(tests/t_log_outside_working_dir.at) m4_include(tests/t_add_inside_MT.at) +m4_include(tests/t_annotate_renames.at)