# HG changeset patch # User Lucas Moscovicz # Date 2014-03-14 00:20:03 # Node ID da3124178fbb2660470e1a73b2f55da92e7b004e # Parent fa1ac5faa7c4613bc4a627aabb8b9fdf9378e00e tests: added tests to test sort revset This tests are intended to test sort in many different cases where it could fail when using the new structures diff --git a/tests/test-revset.t b/tests/test-revset.t --- a/tests/test-revset.t +++ b/tests/test-revset.t @@ -460,6 +460,61 @@ ancestor can accept 0 or more arguments $ log 'tag(tip)' 9 +test sort revset +-------------------------------------------- + +test when adding two unordered revsets + + $ log 'sort(keyword(issue) or modifies(b))' + 4 + 6 + +test when sorting a reversed collection in the same way it is + + $ log 'sort(reverse(all()), -rev)' + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 + 0 + + +test when sorting a reversed collection + + $ log 'sort(reverse(all()), rev)' + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + + +test sorting two sorted collections in different orders + + $ log 'sort(outgoing() or reverse(removes(a)), rev)' + 2 + 6 + 8 + 9 + +test sorting two sorted collections in different orders backwards + + $ log 'sort(outgoing() or reverse(removes(a)), -rev)' + 9 + 8 + 6 + 2 + check that conversion to _missingancestors works $ try --optimize '::3 - ::1' (minus