Skip to content

Commit

Permalink
[t/spec]: Clean up unicode whitespace tests
Browse files Browse the repository at this point in the history
('=' at start of line indicates <pod_comment>).


git-svn-id: http://svn.pugscode.org/pugs@24527 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
pmichaud committed Dec 20, 2008
1 parent 5a66d2a commit 6f48522
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions S02-whitespace_and_comments/unicode-whitespace.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ my @x = <a b c>; sub y (@z) { @z[1] }; y(@x)
is(eval('
my
@x
=
=
<a
b
c>;
Expand All @@ -31,19 +31,19 @@ my @x = <a b c>; sub y (@z) { @z[1] }; y(@x)
'), "b", "LINE TABULATION");

is(eval('
my@x=<abc>;suby(@z){@z[1]};y(@x)
my@x =<abc>;suby(@z){@z[1]};y(@x)
'), "b", "FORM FEED (FF)");

is(eval('
my@x=<abc>;suby(@z){@z[1]};y(@x)
my@x =<abc>;suby(@z){@z[1]};y(@x)
'), "b", "CARRIAGE RETURN (CR)");

is(eval('
my @x = <a b c>; sub y (@z) { @z[1] }; y(@x)
'), "b", "SPACE");

is(eval('
my…@x…=…<a…b…c>;…sub…y…(@z)…{…@z[1]…};…y(@x)
my…@x… =…<a…b…c>;…sub…y…(@z)…{…@z[1]…};…y(@x)
'), "b", "NEXT LINE (NEL)");

is(eval('
Expand Down Expand Up @@ -102,6 +102,7 @@ is(eval('
my @x = <a b c>; sub y (@z) { @z[1] }; y(@x)
'), "b", "HAIR SPACE");

#?rakudo 2 todo "LINE/PARAGRAPH SEPARATOR are ws?"
is(eval('
my
@x
=
<a
b
c>;
sub
y
(@z)
{
@z[1]
};
y(@x)
'), "b", "LINE SEPARATOR");
Expand All @@ -126,7 +127,7 @@ my @x = <a b c>; sub y (@z) { @z[1] }; y(@x)
#These currently get different results than the above

class Str is also {
method id($x:) { $x }
method id() { self }
}

#This makes 'foo.id' and 'foo .id' mean different things
Expand Down Expand Up @@ -158,6 +159,7 @@ is(eval('foo\ .id'), 'a', 'long dot with FIGURE SPACE');
is(eval('foo\ .id'), 'a', 'long dot with PUNCTUATION SPACE');
is(eval('foo\ .id'), 'a', 'long dot with THIN SPACE');
is(eval('foo\ .id'), 'a', 'long dot with HAIR SPACE');
#?rakudo 2 skip "LINE/PARAGRAPH SEPARATOR are ws?"
is(eval('foo\
.id'), 'a', 'long dot with LINE SEPARATOR');
is(eval('foo\
.id'), 'a', 'long dot with PARAGRAPH SEPARATOR');
is(eval('foo\ .id'), 'a', 'long dot with NARROW NO-BREAK SPACE');
Expand Down

0 comments on commit 6f48522

Please sign in to comment.