# # add_file "tests/t_lf_crlf.at" # # patch "ChangeLog" # from [4a235ffd2f5ca5e6b1c3958fc1cd514a99a455a6] # to [041eb51126fe4a2d85037c466c822730c9f2407e] # # patch "tests/t_lf_crlf.at" # from [] # to [5c7f37f18e1ae4e195a4f7581145705d390e1747] # # patch "testsuite.at" # from [af3df6b6c1f6e52c2d4a67ce5205287bda3c77fc] # to [fb517e7363f5d1995cf3b8cfe0239c035d17ebfd] # --- ChangeLog +++ ChangeLog @@ -1,5 +1,11 @@ 2005-04-16 Nathaniel Smith + * tests/t_lf_crlf.at: New test from Emile Snyder + , with tweaks. + * testsuite.at: Add it. + +2005-04-16 Nathaniel Smith + * ChangeLog: Small fixups. 2005-04-16 Sebastian Spaeth --- tests/t_lf_crlf.at +++ tests/t_lf_crlf.at @@ -0,0 +1,44 @@ +AT_SETUP([use get_linesep_conv hook]) +MONOTONE_SETUP +NEED_UNB64 + +# This test is a bug report. +AT_XFAIL_IF(true) + +# This test excercises the common case of wanting to do newline +# character conversion so that win32 users can have native line endings +# in their working copies. + + +# wrote files with 'foo\r\n' and 'foo\r\nfoo\r\n' and used mimencode +# to generate the following b64 encoded contents. +# +# Note the newline before the closing ']', it's necessary. +# +AT_DATA(foo.lfcr.b64, [Zm9vDQo= +]) +AT_DATA(foofoo.lfcr.b64, [Zm9vDQpmb28NCg== +]) + +UNB64(foo.lfcr.b64, foo.lfcr) +UNB64(foofoo.lfcr.b64, foofoo.lfcr) + +AT_DATA(linesep.lua, [ +function get_linesep_conv(name) + return {"LF", "CRLF"} +end +]) + +AT_CHECK(cp foo.lfcr foo, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --rcfile=linesep.lua add foo, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --rcfile=linesep.lua --branch=foo commit -m foo, [], [ignore], [ignore]) +FOO_REV=`BASE_REVISION` + +AT_CHECK(cp foofoo.lfcr foo, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --rcfile=linesep.lua commit -m foofoo, [], [ignore], [ignore]) +FOO_FOO_REV=`BASE_REVISION` + +AT_CHECK(MONOTONE --rcfile=linesep.lua update $FOO_REV, [], [ignore], [ignore]) +AT_CHECK(cmp foo foo.lfcr, [], [ignore], [ignore]) + +AT_CLEANUP --- testsuite.at +++ testsuite.at @@ -554,3 +554,4 @@ m4_include(tests/t_rename_dir_add_dir_with_old_name.at) m4_include(tests/t_rcs_import.at) m4_include(tests/t_cvsimport2.at) +m4_include(tests/t_lf_crlf.at)