[MERGE] Test for bug #272444 (symlinks to Unicode file names)
Daniel Clemente
dcl441-bugs at yahoo.com
Mon Sep 22 19:25:34 BST 2008
Hi, thanks for the tips.
Robert Collins <robertc at robertcollins.net> writes:
> Firstly, we try to put tests in files with related things, related by
> the code they run rather than the concept.
>
There will be probably more tests on utf-8. But as you said, if Bazaar groups them by function checked instead of by concept, then instead of one TestUtf8.py there will be lots of tests for Utf-8, scattered around functions. That's ok.
>
> So - bzrlib/tests/workingtree_implementations (soon to be
> per_workingtree)/test_parents.py, which has a TestSetParents class.
>
I see very little relation between „parents“ and „utf-8 and symlinks“. My test has in addition a very different style from the other tests in that file (it doesn't think about „parents“, it asserts, nothing, ...).
But for the practical reasons you explained, it may be useful to have it there. So I attach a second version of the patch with the test there.
> Adding a test to that class which constructs a symlink to a unicode path
> would catch the failure on both the current disk format, on the wt3
> format (which I think will just work), and on any future formats we
> make.
>
It failed on all three:
bzrlib.tests.workingtree_implementations.test_parents.TestSetParents.test_utf8_symlink(WorkingTreeFormat4)
bzrlib.tests.workingtree_implementations.test_parents.TestSetParents.test_utf8_symlink(WorkingTreeFormat3)
bzrlib.tests.workingtree_implementations.test_parents.TestSetParents.test_utf8_symlink(WorkingTreeFormat2)
----------------------------------------------------------------------
Ran 3 tests in 0.590s
FAILED (errors=3)
tests failed
-- Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_272444.patch
Type: text/x-diff
Size: 3864 bytes
Desc: Testcase patch
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080922/9ef18e48/attachment.bin
More information about the bazaar
mailing list