Browse files

[S03/equality] make sure eq and ne don't do padding semantics

git-svn-id: c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 0312dc0 commit fe765a44f9a324cddc3738f44264b0811019e3b6 lwall committed Mar 16, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 S03-operators/equality.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 15;
+plan 20;
# adapted from t/operators/eq.t and t/operators/cond.t
# relational ops are in relational.t
@@ -18,6 +18,11 @@ ok(!("a" ne "a"), "ne false");
# potential problem cases
ok("\0" eq "\0", "eq on strings with null chars");
+ok(!("\0" eq "\0\0"), "!eq on strings with null chars but different lengths");
+ok(!("a" eq "a\0"), "eq doesn't have null-padding semantics")
+ok(!("a" eq "a "), "eq doesn't have space-padding semantics")
+ok("a" ne "a\0", "ne doesn't have null-padding semantics")
+ok("a" ne "a ", "ne doesn't have space-padding semantics")
# string context on undefined values
my $foo;

0 comments on commit fe765a4

Please sign in to comment.