# New Ticket Created by "Kyle Hasselbacher" # Please include the string: [perl #61930] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61930 >
I don't know why '1 < 2' would work but '2 < 1' would not work, but this tests for that and similar things that weren't tested before. I don't know if this is a good place to test 'cmp' and '<=>' too, but that would be easy enough to add. Index: t/00-parrot/04-op-cmp.t =================================================================== --- t/00-parrot/04-op-cmp.t (revision 34836) +++ t/00-parrot/04-op-cmp.t (working copy) @@ -4,7 +4,7 @@ use v6; -say '1..24'; +say '1..56'; 1 < 2 and say 'ok 1'; 1 > 2 or say 'ok 2'; @@ -31,3 +31,42 @@ 'd' gt 'c' gt 'c' or say 'ok 22'; 'a' ne 'b' and say 'ok 23'; 'a' ne 'a' or say 'ok 24'; + +2 < 1 or say 'ok 25'; +2 > 1 and say 'ok 26'; +2 <= 1 or say 'ok 27'; +2 >= 1 and say 'ok 28'; +1 <= 1 and say 'ok 29'; +1 >= 1 and say 'ok 30'; + +1 <= 2 <= 3 and say 'ok 31'; +1 <= 1 <= 3 and say 'ok 32'; +1 <= 1 <= 1 and say 'ok 33'; +3 >= 2 >= 1 and say 'ok 34'; +3 >= 3 >= 1 and say 'ok 35'; +3 >= 3 >= 3 and say 'ok 36'; + +2 <= 1 <= 1 or say 'ok 37'; +1 <= 2 <= 1 or say 'ok 38'; +1 >= 1 >= 2 or say 'ok 39'; +1 >= 2 >= 1 or say 'ok 40'; + +'b' lt 'a' or say 'ok 41'; +'b' gt 'a' and say 'ok 42'; +'b' le 'a' or say 'ok 43'; +'b' ge 'a' and say 'ok 44'; +'a' le 'a' and say 'ok 45'; +'a' ge 'a' and say 'ok 46'; + +'a' le 'b' le 'c' and say 'ok 47'; +'a' le 'a' le 'c' and say 'ok 48'; +'a' le 'a' le 'a' and say 'ok 49'; +'c' ge 'b' ge 'a' and say 'ok 50'; +'c' ge 'c' ge 'a' and say 'ok 51'; +'c' ge 'c' ge 'c' and say 'ok 52'; + +'b' le 'a' le 'a' or say 'ok 53'; +'a' le 'b' le 'a' or say 'ok 54'; +'a' ge 'a' ge 'b' or say 'ok 55'; +'a' ge 'b' ge 'a' or say 'ok 56'; +