added test for #891: incorrect inversion of chained comparisons; fixed a
faulty test case in test/test_switch.coffee
This commit is contained in:
parent
69664a1bb3
commit
56e10f9bce
|
@ -173,3 +173,6 @@ ok a is '123456'
|
|||
|
||||
# Multiple operators should space themselves.
|
||||
ok + +1 is - -1
|
||||
|
||||
#891: incorrect inversion of chained comparisons
|
||||
ok (true unless 0 > 1 > 2)
|
||||
|
|
|
@ -59,7 +59,7 @@ result = switch
|
|||
when '' not of {''} then 2
|
||||
when [] not instanceof Array then 3
|
||||
when true is false then 4
|
||||
when 'x' < 'y' > 'z' then 5
|
||||
when 'x' > 'y' > 'z' then 5
|
||||
when 'a' in ['b', 'c'] then 6
|
||||
when 'd' in (['e', 'f']) then 7
|
||||
else ok
|
||||
|
|
Loading…
Reference in New Issue