# HG changeset patch # User Steve Losh # Date 1286146770 14400 # Node ID 65228e79868e85cfcf1672291b1118c3f3a4579e # Parent 9bb1865858a7664cb835884e8604fe41bce9bbbf tests: add a test for sort order diff -r 9bb1865858a7 -r 65228e79868e tests/sorting.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/sorting.t Sun Oct 03 18:59:30 2010 -0400 @@ -0,0 +1,41 @@ +Setup: + + $ alias xt="python $TESTDIR/../t.py --task-dir `pwd` --list test" + +Add some tasks manually: + + $ cat > test << EOF + > One | id: 1 + > Two. | id: 2 + > Zero. | id: 0 + > Three. | id: 3 + > A. | id: a + > B. | id: b + > AA. | id: aa + > CC. | id: cc + > EOF + +Make sure they're sorted correctly in the output: + + $ xt + 0 - Zero. + 1 - One + 2 - Two. + 3 - Three. + a - A. + aa - AA. + b - B. + c - CC. + +Make sure the file hasn't actually changed: + + $ cat test + One | id: 1 + Two. | id: 2 + Zero. | id: 0 + Three. | id: 3 + A. | id: a + B. | id: b + AA. | id: aa + CC. | id: cc +