# # add_file "tests/t_rename_diff_names.at" # # patch "ChangeLog" # from [52fb4bb951831adac977541e1051c12c5f88e822] # to [9a7fc83027c62a0337c58de3f6c261511061c38b] # # patch "tests/t_rename_diff_names.at" # from [] # to [a21a0b7910b5acb036380dd2fab966f0aed1dc0b] # # patch "testsuite.at" # from [4405c8c3584fd8462446135258c4bb1f1c7d41fd] # to [db223870ee79b44fa6fe7ec84575b8ee23925541] # ======================================================================== --- ChangeLog 52fb4bb951831adac977541e1051c12c5f88e822 +++ ChangeLog 9a7fc83027c62a0337c58de3f6c261511061c38b @@ -1,3 +1,7 @@ +2005-09-28 Nathaniel Smith + + * tests/t_rename_diff_names.at, testsuite.at: New test. + 2005-09-24 Satoru SATOH * po/ja.po: Updated Japanese translation. ======================================================================== --- tests/t_rename_diff_names.at +++ tests/t_rename_diff_names.at a21a0b7910b5acb036380dd2fab966f0aed1dc0b @@ -0,0 +1,34 @@ +AT_SETUP([filenames in diff after rename]) +MONOTONE_SETUP + +# This test is a bug report. + +# If a file is renamed from "testfile" to "otherfile" and has changes, +# then 'monotone diff' should display: +# --- testfile +# +++ otherfile +# But what it does display is +# --- otherfile +# +++ otherfile +# This is because the diffs are built based on changeset deltas, and +# changeset deltas are applied after renames have already taken +# effect. + +AT_XFAIL_IF(true) + +ADD_FILE(testfile, [blah blah +]) +COMMIT(testbranch) + +SET_FILE(testfile, [stuff stuff +]) +AT_CHECK(MONOTONE rename --execute testfile otherfile, [], [ignore], [ignore]) + +AT_CHECK(test -f otherfile) + +AT_CHECK(MONOTONE diff, [], [stdout], [ignore]) + +AT_CHECK(QGREP(-- "--- testfile" stdout)) +AT_CHECK(QGREP(-- "+++ otherfile" stdout), [1]) + +AT_CLEANUP ======================================================================== --- testsuite.at 4405c8c3584fd8462446135258c4bb1f1c7d41fd +++ testsuite.at db223870ee79b44fa6fe7ec84575b8ee23925541 @@ -706,3 +706,4 @@ m4_include(tests/t_unreadable_db.at) m4_include(tests/t_restriction_with_exclude.at) m4_include(tests/t_restriction_with_exclude_iprint.at) +m4_include(tests/t_rename_diff_names.at)