# # # add_file "tests/t_ls_unknown.at" # content [e0b34815c77fe8df3082691e6f81b327f51411cd] # # patch "ChangeLog" # from [f4ae4111f44e98d4c1be5cac725590217e557023] # to [0c578955f63ad6cb465788a62afd792c3ffce8b3] # # patch "tests/t_automate_inventory.at" # from [1a9fcca95a722a81cf5fe49a6dd7025900c4e311] # to [fb2dd05a38058f8b3d96459883d6d77077c09146] # # patch "tests/t_cvsimport.at" # from [72f1079d6cb4ac5810d17e8ecf709e97cec1460b] # to [d90be7362d26765d89f6fc6a3fed42cd2df05f10] # # patch "testsuite.at" # from [ba943ffe903445a96c42d9196cc9d167b5f7858f] # to [1353463027f71082bc339aaafab7d55b0ccbde27] # ============================================================ --- tests/t_ls_unknown.at e0b34815c77fe8df3082691e6f81b327f51411cd +++ tests/t_ls_unknown.at e0b34815c77fe8df3082691e6f81b327f51411cd @@ -0,0 +1,42 @@ +# -*- Autoconf -*- + +AT_SETUP([listing unknown files in workspace]) + +MONOTONE_SETUP + +# Buggy invariant causes failure when file with back slash in name exists +# in workspace. +AT_XFAIL_IF(test "$OSTYPE" != "msys") + +AT_CHECK(MONOTONE ls missing, [0], [stdout], [ignore]) +AT_CHECK(cmp /dev/null stdout, [], [ignore]) + +AT_CHECK(mkdir dir) +AT_DATA(dir/foo, [the foo file +]) +AT_DATA(dir/bar, [the bar file +]) +AT_DATA(dir/baz, [the baz file +]) + +AT_CHECK(MONOTONE add dir/baz, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --branch=testbranch commit --message='committed', [], [ignore], [ignore]) + +if test "$OSTYPE" != "msys"; then +AT_DATA(dir/back\\slash, [the file with a back slash in the name +]) +AT_DATA(ls_foobar, [dir/back\\slash +dir/bar +dir/foo +]) +else +AT_DATA(ls_foobar, [dir/bar +dir/foo +]) +fi + +AT_CHECK(MONOTONE ls unknown dir/ | sort, [], [stdout], []) +AT_CHECK(CANONICALISE(stdout)) +AT_CHECK(cmp stdout ls_foobar, [], [ignore]) + +AT_CLEANUP ============================================================ --- ChangeLog f4ae4111f44e98d4c1be5cac725590217e557023 +++ ChangeLog 0c578955f63ad6cb465788a62afd792c3ffce8b3 @@ -1,3 +1,14 @@ +2006-03-02 Emile Snyder + + XFAIL tests on non-win32 systems where we innappropriately I() + that some path does not have a '\' character in it. + + tests/t_cvsimport.at: CVS repository files can trigger this bug. + tests/t_automate_inventory.at + tests/t_ls_unknown.at: Files in the workspace can trigger this bug in + these two cases. + testsuite.at: Add new ls_unknown test case. + 2006-03-01 Benoît Dejean * po/fr.po: Updated French translation. ============================================================ --- tests/t_automate_inventory.at 1a9fcca95a722a81cf5fe49a6dd7025900c4e311 +++ tests/t_automate_inventory.at fb2dd05a38058f8b3d96459883d6d77077c09146 @@ -1,6 +1,10 @@ AT_SETUP([workspace inventory]) MONOTONE_SETUP +# Buggy invariant causes failure when file with back slash in name exists +# in workspace. +AT_XFAIL_IF(test "$OSTYPE" != "msys") + AT_DATA(inventory_hooks.lua, [ function ignore_file(name) @@ -29,6 +33,10 @@ ]) AT_DATA(unknown, [unknown ]) +if test "$OSTYPE" != "msys"; then +AT_DATA(back\\slash, [unknown back slash file name +]) +fi AT_DATA(ignored~, [ignored~ ]) @@ -51,6 +59,9 @@ AT_CHECK(grep '^ P 0 0 patched$' stdout, [], [ignore], [ignore]) AT_CHECK(grep '^ 0 0 unchanged$' stdout, [], [ignore], [ignore]) AT_CHECK(grep '^ U 0 0 unknown$' stdout, [], [ignore], [ignore]) +if test "$OSTYPE" != "msys"; then +AT_CHECK(grep '^ U 0 0 back\\slash$' stdout, [], [ignore], [ignore]) +fi AT_CHECK(grep '^ I 0 0 ignored~$' stdout, [], [ignore], [ignore]) # swapped but not moved ============================================================ --- tests/t_cvsimport.at 72f1079d6cb4ac5810d17e8ecf709e97cec1460b +++ tests/t_cvsimport.at d90be7362d26765d89f6fc6a3fed42cd2df05f10 @@ -1,9 +1,12 @@ # -*- Autoconf -*- AT_SETUP([importing CVS files]) MONOTONE_SETUP +# File names with backslashes in them are legal in cvs, but not in monotone. +AT_XFAIL_IF(test "$OSTYPE" != "msys") + AT_DATA(importme.0, [version 0 of test file ]) @@ -16,6 +19,11 @@ AT_DATA(importme.3, [version 3 of test file ]) +if test "$OSTYPE" != "msys"; then +AT_DATA(importback\\slash, [file with a back slash in the name +]) +fi + TSHA0=`SHA1(importme.0)` TSHA1=`SHA1(importme.1)` TSHA2=`SHA1(importme.2)` @@ -44,6 +52,14 @@ AT_CHECK(cp importme.3 testdir/importme) AT_CHECK(cvs -d $CVSROOT commit -m 'commit 3' testdir/importme, [], [ignore], [ignore]) +# file names with backslashes in them are legal in cvs, but not in monotone. + +if test "$OSTYPE" != "msys"; then +AT_CHECK(cp importback\\slash testdir/importback\\slash) +AT_CHECK(cvs -d $CVSROOT add testdir/importback\\slash, [], [ignore], [ignore]) +AT_CHECK(cvs -d $CVSROOT commit -m 'commit 4' testdir/importback\\slash, [], [ignore], [ignore]) +fi + # import into monotone and check presence of files # safety check -- we stop people from accidentally feeding their whole ============================================================ --- testsuite.at ba943ffe903445a96c42d9196cc9d167b5f7858f +++ testsuite.at 1353463027f71082bc339aaafab7d55b0ccbde27 @@ -787,3 +787,4 @@ m4_include(tests/t_log_dir.at) m4_include(tests/t_show_conflicts.at) m4_include(tests/t_merge_into_dir.at) +m4_include(tests/t_ls_unknown.at)