Browse files

[t/spec] cosmetic cleaning: remove trailing space

git-svn-id: http://svn.pugscode.org/pugs@26701 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 37ca234 commit 189b4dbe8ae169ecee8d92d6d26dea47bb16c410 wollmers committed May 6, 2009
Showing with 139 additions and 142 deletions.
  1. +2 −2 S02-builtin_data_types/anon_block.t
  2. +19 −19 S02-builtin_data_types/array.t
  3. +1 −1 S02-builtin_data_types/assigning-refs.t
  4. +1 −1 S02-builtin_data_types/bool.t
  5. +4 −4 S02-builtin_data_types/capture.t
  6. +0 −1 S02-builtin_data_types/flattening.t
  7. +10 −10 S02-builtin_data_types/hash.t
  8. +4 −4 S02-builtin_data_types/hash_ref.t
  9. +42 −42 S02-builtin_data_types/lazy-lists.t
  10. +3 −3 S02-builtin_data_types/multi_dimensional_array.t
  11. +1 −1 S02-builtin_data_types/nan.t
  12. +1 −1 S02-builtin_data_types/nested_arrays.t
  13. +1 −1 S02-builtin_data_types/num.t
  14. +3 −3 S02-builtin_data_types/pair.t
  15. +0 −1 S02-builtin_data_types/range.t
  16. +2 −2 S02-builtin_data_types/sigils-and-types.t
  17. +2 −3 S02-builtin_data_types/type.t
  18. +2 −2 S02-lexical-conventions/unicode.t
  19. +3 −3 S02-literals/array-interpolation.t
  20. +1 −1 S02-literals/char-by-name.t
  21. +1 −1 S02-literals/fmt-interpolation.t
  22. +1 −1 S02-literals/listquote-whitespace.t
  23. +1 −1 S02-literals/listquote.t
  24. +1 −1 S02-literals/pairs.t
  25. +11 −11 S02-literals/quoting-unicode.t
  26. +3 −3 S02-literals/quoting.t
  27. +2 −2 S02-literals/sub-calls.t
  28. +4 −4 S02-magicals/dollar-underscore.t
  29. +2 −2 S02-magicals/dollar_bang.t
  30. +1 −1 S02-magicals/file_line.t
  31. +1 −1 S02-magicals/progname.t
  32. +1 −1 S02-names_and_variables/fmt.t
  33. +2 −2 S02-names_and_variables/perl.t
  34. +1 −1 S02-names_and_variables/signature.t
  35. +2 −2 S02-names_and_variables/variables-and-packages.t
  36. +2 −2 S02-whitespace_and_comments/comments.t
  37. +1 −1 S02-whitespace_and_comments/sub-block-parsing.t
View
4 S02-builtin_data_types/anon_block.t
@@ -7,7 +7,7 @@ use Test;
Block tests
This covers anonymous blocks and subs, as well as pointy blocks
-(with and without args) and bare blocks.
+(with and without args) and bare blocks.
=end description
@@ -31,7 +31,7 @@ isa_ok($anon_block, Block);
is($anon_block(), 1, '{} <anon block> works');
# L<S06/""Pointy blocks"">
-{
+{
# pointy subs
my $pointy_block = -> { 1 };
isa_ok($pointy_block, Block);
View
38 S02-builtin_data_types/array.t
@@ -56,12 +56,12 @@ my @array2 = ("test", 1, undef);
my @array3 = (@array1, @array2);
isa_ok(@array3, Array);
- is(+@array3, 6, 'the array3 has 6 elements');
- is(@array3[0], 'foo', 'got the right value at array3 index 0');
- is(@array3[1], 'bar', 'got the right value at array3 index 1');
- is(@array3[2], 'baz', 'got the right value at array3 index 2');
- is(@array3[3], 'test', 'got the right value at array3 index 3');
- is(@array3[4], 1, 'got the right value at array3 index 4');
+ is(+@array3, 6, 'the array3 has 6 elements');
+ is(@array3[0], 'foo', 'got the right value at array3 index 0');
+ is(@array3[1], 'bar', 'got the right value at array3 index 1');
+ is(@array3[2], 'baz', 'got the right value at array3 index 2');
+ is(@array3[3], 'test', 'got the right value at array3 index 3');
+ is(@array3[4], 1, 'got the right value at array3 index 4');
ok(!@array3[5].defined,'got the right value at array3 index 5');
}
@@ -97,10 +97,10 @@ my @array2 = ("test", 1, undef);
my @array6 = @array1[@slice];
isa_ok(@array6, Array);
- is(+@array6, 3, 'the array6 has 3 elements');
- is(@array6[0], 'baz', 'got the right value at array6 index 0');
- is(@array6[1], 'foo', 'got the right value at array6 index 1');
- is(@array6[2], 'bar', 'got the right value at array6 index 2');
+ is(+@array6, 3, 'the array6 has 3 elements');
+ is(@array6[0], 'baz', 'got the right value at array6 index 0');
+ is(@array6[1], 'foo', 'got the right value at array6 index 1');
+ is(@array6[2], 'bar', 'got the right value at array6 index 2');
}
{
@@ -132,7 +132,7 @@ my @array2 = ("test", 1, undef);
is(+@array9, 0, "new arrays are empty");
my @array10 = (1, 2, 3,);
- is(+@array10, 3, "trailing commas make correct array");
+ is(+@array10, 3, "trailing commas make correct array");
}
#?pugs skip "multi-dim arrays not implemented"
@@ -155,7 +155,7 @@ my @array2 = ("test", 1, undef);
#?pugs skip "no whatever star yet"
{
- my @array12 = ('a', 'b', 'c', 'e');
+ my @array12 = ('a', 'b', 'c', 'e');
# indexing from the end
is @array12[*-1],'e', "indexing from the end [*-1]";
@@ -165,27 +165,27 @@ my @array2 = ("test", 1, undef);
# end index as lvalue
@array12[*-1] = 'd';
- is @array12[*-1], 'd', "assigns to the correct end slice index";
+ is @array12[*-1], 'd', "assigns to the correct end slice index";
is ~@array12,'a b c d', "assignment to end index correctly alters the array";
}
#?pugs skip "no whatever star yet"
{
- my @array13 = ('a', 'b', 'c', 'd');
+ my @array13 = ('a', 'b', 'c', 'd');
# end index range as lvalue
@array13[*-4 .. *-1] = ('d', 'c', 'b', 'a'); # ('a'..'d').reverse
- is ~@array13, 'd c b a', "end range as lvalue";
+ is ~@array13, 'd c b a', "end range as lvalue";
#hat trick
my @array14 = ('a', 'b', 'c', 'd');
my @b = 0..3;
((@b[*-3,*-2,*-1,*-4] = @array14)= @array14[*-1,*-2,*-3,*-4]);
- is ~@b,
- 'a d c b',
+ is ~@b,
+ 'a d c b',
"hat trick:
- assign to a end-indexed slice array from array
- lvalue in assignment is then lvalue to end-indexed slice as rvalue";
+ assign to a end-indexed slice array from array
+ lvalue in assignment is then lvalue to end-indexed slice as rvalue";
}
# This test may seem overly simplistic, but it was actually a bug in PIL2JS, so
View
2 S02-builtin_data_types/assigning-refs.t
@@ -35,7 +35,7 @@ plan 18;
my $hashref = {:a(1), :b(2), :c(3)};
my %hash;
try { %hash = ($hashref,) };
-
+
#?rakudo todo 'non-flattening hash refs'
#?pugs todo 'non-flattening hash refs'
is +%hash, 1, '%hash = ($hashref,) does not flatten the hashref';
View
2 S02-builtin_data_types/bool.t
@@ -47,7 +47,7 @@ is(+Bool::True, '1', 'True numifies to 1');
is(+Bool::False, '0', 'False numifies to 0');
# stringification
is(~Bool::True, '1', 'True stringifies to 1');
-is(~Bool::False, '0', 'False stringifies to 0');
+is(~Bool::False, '0', 'False stringifies to 0');
# Arithmetic operations
my $bool = Bool::False;
View
8 S02-builtin_data_types/capture.t
@@ -6,7 +6,7 @@ plan 18;
{
my $capture = \(1,2,3);
-
+
# L<S03/Argument List Interpolating/explicitly flatten it in one of>
sub foo1 ($a, $b, $c) { "$a!$b!$c" }
is foo1(|$capture), "1!2!3",
@@ -15,7 +15,7 @@ plan 18;
{
my $capture = \(1,2,3,'too','many','args');
-
+
# L<S03/Argument List Interpolating/explicitly flatten it in one of>
sub foo2 ($a, $b, $c) { "$a!$b!$c" }
dies_ok { foo2(|$capture) },
@@ -24,7 +24,7 @@ plan 18;
{
my $capture = \(1, named => "arg");
-
+
# L<S03/Argument List Interpolating/explicitly flatten it in one of>
sub foo3 ($a, :$named) { "$a!$named" }
#?rakudo todo 'capture with named args'
@@ -34,7 +34,7 @@ plan 18;
{
my $capture = \(1, 'positional' => "pair");
-
+
# L<S03/Argument List Interpolating/explicitly flatten it in one of>
sub foo4 ($a, $pair) { "$a!$pair" }
is foo4(|$capture), "1!positional\tpair",
View
1 S02-builtin_data_types/flattening.t
@@ -79,4 +79,3 @@ plan 34;
push @a, %foo;
is(@a.elems, 5, 'Hash flattened');
}
-
View
20 S02-builtin_data_types/hash.t
@@ -7,15 +7,15 @@ plan 63;
# basic lvalue assignment
# L<S09/Hashes>
-my %hash1;
+my %hash1;
isa_ok(%hash1, Hash);
-%hash1{"one"} = 5;
+%hash1{"one"} = 5;
is(%hash1{"one"}, 5, 'lvalue hash assignment works (w/ double quoted keys)');
-%hash1{'one'} = 4;
+%hash1{'one'} = 4;
is(%hash1{'one'}, 4, 'lvalue hash re-assignment works (w/ single quoted keys)');
-%hash1<three> = 3;
+%hash1<three> = 3;
is(%hash1<three>, 3, 'lvalue hash assignment works (w/ unquoted style <key>)');
# basic hash creation w/ comma seperated key/values
@@ -72,7 +72,7 @@ is(%hash5<three>, 1, 'value was changed successfully with slice assignment');
is(%hash5<foo>[0], 3, 'value assigned successfully with arrayref in list context');
is(%hash5<foo>[1], 1, 'value assigned successfully with arrayref in list context');
-# keys
+# keys
my %hash6 = ("one", 1, "two", 2, "three", 3);
isa_ok(%hash6, Hash);
@@ -120,13 +120,13 @@ is(%hash8{'three'}, 3, 'colonpair :three(3)');
my $key;
my $val;
-my %hash9;
+my %hash9;
isa_ok(%hash9, Hash);
%hash9{1} = 2;
-for (%hash9.kv) -> $k,$v {
- $key = $k;
- $val = $v;
+for (%hash9.kv) -> $k,$v {
+ $key = $k;
+ $val = $v;
}
is($key, 1, '%hash.kv gave us our key');
@@ -151,7 +151,7 @@ sub test2 (%hash) {
my %h = hash (a => 'b');
-#sanity: Hash created in a sub is a Hash
+#sanity: Hash created in a sub is a Hash
test1;
test2 %h;
View
8 S02-builtin_data_types/hash_ref.t
@@ -7,18 +7,18 @@ plan 32;
# basic lvalue assignment
#?rakudo skip 'hash autovivification'
{
- my $hash;
+ my $hash;
isa_ok $hash, Any;
- $hash{"1st"} = 5;
+ $hash{"1st"} = 5;
isa_ok $hash, Hash;
is $hash{"1st"}, 5, 'lvalue hash assignment works (w/ double quoted keys)';
- $hash{'1st'} = 4;
+ $hash{'1st'} = 4;
is $hash{'1st'}, 4, 'lvalue hash re-assignment works (w/ single quoted keys)';
- $hash<3rd> = 3;
+ $hash<3rd> = 3;
is $hash<3rd>, 3, 'lvalue hash assignment works (w/ unquoted style <key>)';
}
View
84 S02-builtin_data_types/lazy-lists.t
@@ -6,9 +6,9 @@ use v6;
#
# TODO - uncomment "countable lazy slice" test
# TODO - add timeout control, in tests that may loop forever
-# TODO - the backends that don't have infinite lists implemented
+# TODO - the backends that don't have infinite lists implemented
# should warn of this, instead of entering an infinite loop.
-# TODO - add test for (1..Inf:by(2))
+# TODO - add test for (1..Inf:by(2))
# TODO - add test for "build a list from a coroutine"
# TODO - add test for zip()
# TODO - add test for 2D array
@@ -19,48 +19,48 @@ plan 32;
#?pugs emit unless $?PUGS_BACKEND eq "BACKEND_PERL5" {
-#?pugs emit skip_rest ("$?PUGS_BACKEND does not support lazy lists yet.",
+#?pugs emit skip_rest ("$?PUGS_BACKEND does not support lazy lists yet.",
#?pugs emit :depends("lazy lists") );
#?pugs emit exit;
#?pugs emit }
# constructors
-is( (1..Inf).perl,
- "(1, 2, 3, ..., Inf)",
+is( (1..Inf).perl,
+ "(1, 2, 3, ..., Inf)",
"simple infinite list" );
#?rakudo skip "Method 'perl' not found in * (Whatever)"
-is( (1..*).perl,
- "(1, 2, 3, ..., Inf)",
+is( (1..*).perl,
+ "(1, 2, 3, ..., Inf)",
"simple infinite list" );
-is( (-Inf..Inf).perl,
- "(-Inf, ..., Inf)",
+is( (-Inf..Inf).perl,
+ "(-Inf, ..., Inf)",
"double infinite list" );
#?rakudo skip "Method 'perl' not found in * (Whatever)"
-is( (*..*).perl,
- "(-Inf, ..., Inf)",
+is( (*..*).perl,
+ "(-Inf, ..., Inf)",
"double infinite list" );
-is( (-Inf..0).perl,
- "(-Inf, ..., -2, -1, 0)",
+is( (-Inf..0).perl,
+ "(-Inf, ..., -2, -1, 0)",
"negative infinite list" );
#?rakudo skip "Method 'perl' not found in * (Whatever)"
-is( (*..0).perl,
- "(-Inf, ..., -2, -1, 0)",
+is( (*..0).perl,
+ "(-Inf, ..., -2, -1, 0)",
"negative infinite list" );
# this one should not really work unless .perl gives up before infinity
-is( ('aaaa'..'zzzz').perl,
- "('aaaa', 'aaab', 'aaac', ..., 'zzzx', 'zzzy', 'zzzz')",
+is( ('aaaa'..'zzzz').perl,
+ "('aaaa', 'aaab', 'aaac', ..., 'zzzx', 'zzzy', 'zzzz')",
"string lazy list" );
#?rakudo skip "Method 'perl' not found in * (Whatever)"
-is( ('aaaa'..*).perl,
- "('aaaa', 'aaab', 'aaac', ..., *)",
+is( ('aaaa'..*).perl,
+ "('aaaa', 'aaab', 'aaac', ..., *)",
"infinite string lazy list" );
#?rakudo skip 'get_integer() not implemented in "Whatever"'
@@ -73,65 +73,65 @@ is( (1..*,2,3).perl,
#?rakudo skip "Method 'splice' not found in 'Perl6Array'"
{
my @a = (1..Inf);
- is( @a.splice( 2, 3 ),
+ is( @a.splice( 2, 3 ),
"(3, 4, 5)",
"splice" );
- is( @a,
+ is( @a,
"(1, 2, 6, ..., Inf)",
"spliced" );
}
#?rakudo skip "Method 'splice' not found in 'Perl6Array'"
{
my @a = (1..Inf);
- is( @a.splice( 2, Inf, 99, 100 ),
+ is( @a.splice( 2, Inf, 99, 100 ),
"(3, 4, 5, ..., Inf)",
"splice" );
- is( @a,
+ is( @a,
"(1, 2, 99, 100)",
"spliced" );
}
# basic list operations
-is( (1..Inf).elems,
- "Inf",
+is( (1..Inf).elems,
+ "Inf",
"elems" );
-is( (1..Inf).shift,
- "1",
+is( (1..Inf).shift,
+ "1",
"shift" );
#?rakudo skip "decrement() not implemented in class 'Undef'"
-is( (1..Inf).pop,
- "Inf",
+is( (1..Inf).pop,
+ "Inf",
"pop" );
-is( (1..Inf).clone,
- "(1, 2, 3, ..., Inf)",
+is( (1..Inf).clone,
+ "(1, 2, 3, ..., Inf)",
"clone" );
-is( (1..Inf).reverse.perl,
- "(Inf, ..., 3, 2, 1)",
+is( (1..Inf).reverse.perl,
+ "(Inf, ..., 3, 2, 1)",
"reverse" );
#?rakudo skip 'Parse Error: Statement not terminated properly'
-is( (1..Inf).map:{ $_/2 }.perl,
- "(0.5, 1, 1.5, ..., Inf)",
+is( (1..Inf).map:{ $_/2 }.perl,
+ "(0.5, 1, 1.5, ..., Inf)",
"map" );
is( ('x' xx 1000000).perl,
"('x', 'x', 'x', ..., 'x', 'x', 'x')",
"xx operator" );
#?rakudo skip "Method 'sum' not found for 'Range'"
-is( (1..Inf).sum,
- "Inf",
+is( (1..Inf).sum,
+ "Inf",
"infinite sum" );
#?rakudo skip "Method 'sum' not found for 'Range'"
-is( (1..1000000).sum,
- "500000500000",
+is( (1..1000000).sum,
+ "500000500000",
"non-infinite sum" );
# slices
@@ -154,7 +154,7 @@ is( (1..Inf)[2..Inf].perl,
"lazy slice" );
#?pugs emit if $?PUGS_BACKEND eq "BACKEND_PERL5" {
-#?pugs emit skip ( 1, "countable lazy slice not fully implemented in $?PUGS_BACKEND yet",
+#?pugs emit skip ( 1, "countable lazy slice not fully implemented in $?PUGS_BACKEND yet",
#?pugs emit :depends("lazy slices") );
#?pugs emit is( (1..Inf)[2..100000].perl,
#?pugs emit "(3, 4, 5, ..., 100001, 100002, 100003)",
@@ -216,7 +216,7 @@ is( (1..Inf)[2..Inf].perl,
# assorted operations
-is( (1..Inf, (1..Inf).reverse ).perl,
- "(1, 2, 3,, ..., 3, 2, 1)",
+is( (1..Inf, (1..Inf).reverse ).perl,
+ "(1, 2, 3,, ..., 3, 2, 1)",
"end of infinite list is readable" );
View
6 S02-builtin_data_types/multi_dimensional_array.t
@@ -53,7 +53,7 @@ is($multi1[0], 1, 'got the right value at multi1 index 0');
isa_ok($multi1[1], List);
-# multi-dimensional array slices
+# multi-dimensional array slices
# L<S09/"Subscript and slice notation"/index value to each slice>
#?rakudo 3 skip 'Null PMC access in find_method()'
@@ -93,7 +93,7 @@ is(eval('$multi2[0;0]'), 1, 'got the right value at multi2 index 0,0');
is(eval('$multi2[0;1]'), 2, 'got the right value at multi2 index 0,1');
is(eval('$multi2[0;2]'), 3, 'got the right value at multi2 index 0,2');
-# normal
+# normal
is($multi2[0][0], 1, 'got the right value at multi2 index 0,0');
is($multi2[0][1], 2, 'got the right value at multi2 index 0,1');
@@ -107,7 +107,7 @@ is($multi2[0][2], 3, 'got the right value at multi2 index 0,2');
}
isa_ok($multi2[1], List);
-# slice
+# slice
#?rakudo 3 skip 'Null PMC access in find_method()'
#?pugs 3 todo ''
View
2 S02-builtin_data_types/nan.t
@@ -13,7 +13,7 @@ is Inf / Inf, NaN, "Inf / Inf";
is Inf - Inf, NaN, "Inf - Inf";
# if we say that 0**0 and Inf**0 both give 1 (sse below), then for which
# number or limit whould $number ** 0 be different from 1? so maybe just say
-# that NaN ** 0 == 1?
+# that NaN ** 0 == 1?
#?rakudo skip 'unspecced and inconsistent'
is NaN ** 0, NaN, "NaN ** 0";
View
2 S02-builtin_data_types/nested_arrays.t
@@ -4,7 +4,7 @@ use Test;
# L<S02/Mutable types/Array>
-=begin description
+=begin description
Nested array tests; various interactions of arrayrefs, arrays, flattening and nesting.
View
2 S02-builtin_data_types/num.t
@@ -82,7 +82,7 @@ plan 48;
}
{
- my $a = 1; "$a";
+ my $a = 1; "$a";
is($a + 1, 2, 'basic addition works');
}
View
6 S02-builtin_data_types/pair.t
@@ -121,7 +121,7 @@ is($quux.key, 'quux', "lhs quotes" );
my %hash = ('foo' => 'bar');
for %hash.pairs -> $pair {
- isa_ok($pair,Pair) ;
+ isa_ok($pair,Pair) ;
my $testpair = $pair;
isa_ok($testpair, Pair); # new lvalue variable is also a Pair
my $boundpair := $pair;
@@ -132,7 +132,7 @@ for %hash.pairs -> $pair {
sub test2 (%h){
for %h.pairs -> $pair {
- isa_ok($pair,Pair) ;
+ isa_ok($pair,Pair) ;
is($pair.key, 'foo', 'in sub test2 got the right $pair.key');
is($pair.value, 'bar', 'in sub test2 got the right $pair.value');
}
@@ -157,7 +157,7 @@ Hm, Hash::pair? Never heard of that. --iblech
sub test4 (%h){
for %h.pair -> $pair {
- isa_ok($pair,Pair,:todo<bug>) ;
+ isa_ok($pair,Pair,:todo<bug>) ;
is($pair.key, 'foo', 'sub test4: access by unspecced "pair" got the right $pair.key');
is($pair.value, 'bar', 'sub test4: access by unspecced "pair" got the right $pair.value');
View
1 S02-builtin_data_types/range.t
@@ -58,7 +58,6 @@ is ('a'..'a'), [< a >], 'got the right array';
is $y, 4, '(1..4).reverse.perl returns something useful';
#?rakudo todo 'Range.reverse, :by(-1)'
isa_ok (1..4).reverse, Range, "... and it's a range";
-
}
# ACCEPTS and equals tests
View
4 S02-builtin_data_types/sigils-and-types.t
@@ -26,9 +26,9 @@ role Callable is builtin {
multi postcircumfix:<( )> {...}
}
-# This classes actually have a definition outside of Prelude
+# This classes actually have a definition outside of Prelude
but this definition does not include declaration of sigil traits.
-
+
class List does Positional ;
class Capture does Positional does Associative;
View
5 S02-builtin_data_types/type.t
@@ -23,11 +23,11 @@ my Int $foo;
my Str $bar;
{
- #?pugs 1 todo
+ #?pugs 1 todo
dies_ok({$foo = 'xyz'}, 'Int restricts to integers');
is(($foo = 42), 42, 'Int is an integer');
- #?pugs 1 todo
+ #?pugs 1 todo
dies_ok({$bar = 42}, 'Str restricts to strings');
is(($bar = 'xyz'), 'xyz', 'Str is a strings');
}
@@ -107,7 +107,6 @@ my $baz of Int;
eval_dies_ok('returntype4(False)', 'bad return value dies (my Type sub as OtherType)');
is(returntype5(True), 2.2, 'good return value works (--> Type as OtherType)');
eval_dies_ok('returntype5(False)', 'bad return value dies (--> Type as OtherType)');
-
}
{
View
4 S02-lexical-conventions/unicode.t
@@ -9,7 +9,7 @@ plan 30;
# Unicode variables
# english ;-)
lives_ok {my $foo; sub foo {}; 1}, "ascii declaration";
-is (do {my $bar = 2; sub id ($x) { $x }; id($bar)}), 2, "evaluation";
+is (do {my $bar = 2; sub id ($x) { $x }; id($bar)}), 2, "evaluation";
# umlauts
lives_ok {my $übervar; sub {}; 1}, "umlauts declaration";
@@ -46,7 +46,7 @@ is (do {my $באר = 2; sub זהות ($x) { $x }; זהות($באר)}), 2, "evalu
# magyar
lives_ok {my $aáeéiíoóöőuúüű ; 1}, "magyar declaration";
-is (do {my $áéóőöúűüí = 42; sub űáéóőöúüí ($óőöú) { $óőöú }; űáéóőöúüí($áéóőöúűüí)}),
+is (do {my $áéóőöúűüí = 42; sub űáéóőöúüí ($óőöú) { $óőöú }; űáéóőöúüí($áéóőöúűüí)}),
42, "evaluation";
# russian
View
6 S02-literals/array-interpolation.t
@@ -4,9 +4,9 @@ use Test;
# L<S02/Literals/As with Perl 5 array interpolation>
# See L<http://www.nntp.perl.org/group/perl.perl6.language/23224>:
-# In a private conversation with Larry this afternoon, he said that by
-# default "$foo" and ~$foo and $foo.as(Str) all give the same result
-# (assuming scalar context, etc.). And that "@foo[]" and ~[at]foo and
+# In a private conversation with Larry this afternoon, he said that by
+# default "$foo" and ~$foo and $foo.as(Str) all give the same result
+# (assuming scalar context, etc.). And that "@foo[]" and ~[at]foo and
# @foo.as(Str) are the same as join(' ', @foo) where join is effectively:
plan 12;
View
2 S02-literals/char-by-name.t
@@ -27,5 +27,5 @@ is "\c[LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER B]", 'AB', 'two letters in \
is "\c[LATIN CAPITAL LETTER A, COMBINING GRAVE ACCENT]", "\x[0041,0300]", 'letter and combining char in \c[]';
#?rakudo skip 'RT #64918'
-ok "\c[LATIN SMALL LETTER A WITH DIAERESIS,COMBINING CEDILLA]" ~~ /\w/,
+ok "\c[LATIN SMALL LETTER A WITH DIAERESIS,COMBINING CEDILLA]" ~~ /\w/,
'RT #64918 (some strings throw "Malformed UTF-8 string" errors';
View
2 S02-literals/fmt-interpolation.t
@@ -51,7 +51,7 @@ is(
eval(
q[
$y = "hex-formatted ord of \$x is {$x.ord().fmt('%x')}";
- $z = 1;
+ $z = 1;
$y;
]
),
View
2 S02-literals/listquote-whitespace.t
@@ -57,7 +57,7 @@ for @nonseparators -> $sep {
my @res = eval $str;
my $vis = sprintf "%02x", ord $sep;
- #?rakudo emit if $sep eq "\xa0" {
+ #?rakudo emit if $sep eq "\xa0" {
#?rakudo emit todo('\xa0 should not be a separator for list quotes');
#?rakudo emit };
is( @res, [@list.join($sep)], "'\\x$vis' does not split in a whitespace quoted list")
View
2 S02-literals/listquote.t
@@ -61,7 +61,7 @@ ok( ?((1 | 3) < 3), '(...) < 3 no parsefail');
#?rakudo todo 'parsing'
eval_dies_ok '(1 | 3)<3', '()<3 parsefail';
-# WRONG: should be parsed as print() < 3
+# WRONG: should be parsed as print() < 3
# eval 'print < 3';
# ok($!, 'print < 3 parsefail');
View
2 S02-literals/pairs.t
@@ -62,7 +62,7 @@ sub f2 (:$a!) { WHAT($a) }
dies_ok { f2((:a(42))) }, "'(:a(42))' is a pair";
dies_ok { f2((:a)) }, "'(:a)' is a pair";
dies_ok { &f2.((:a)) }, "in '&f2.((:a))', '(:a)' is a pair";
-
+
#?rakudo 4 todo 'not every pair acts as named parameters'
dies_ok { $f2((:a)) }, "in '\$f2((:a))', '(:a)' is a pair";
dies_ok { $f2.((:a)) }, "in '\$f2.((:a))', '(:a)' is a pair";
View
22 S02-literals/quoting-unicode.t
@@ -5,7 +5,7 @@ plan 70;
#L<S02/Literals>
# TODO:
-#
+#
# * review shell quoting semantics of «»
# * arrays in «»
@@ -31,29 +31,29 @@ RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER(U+298D/U+298E)';
{
my $s = q〝blah blah blah〞;
is $s, 'blah blah blah',
- 'q-style string with REVERSED DOUBLE PRIME QUOTATION MARK and
-DOUBLE PRIME QUOTATION MARK(U+301D/U+301E)';
+ 'q-style string with REVERSED DOUBLE PRIME QUOTATION MARK and
+ DOUBLE PRIME QUOTATION MARK(U+301D/U+301E)';
}
{
my %ps_pe = (
'(' => ')', '[' => ']', '{' => '}', '' => '', '' => '',
'' => '', '' => '', '' => '', '' => '', '' => '',
- '' => '', '' => '', '' => '', '' => '', '' => '',
- '' => '', '' => '', '' => '', '' => '', '' => '',
+ '' => '', '' => '', '' => '', '' => '', '' => '',
+ '' => '', '' => '', '' => '', '' => '', '' => '',
'' => '', '' => '', '' => '', '' => '', '' => '',
- '' => '', '' => '', '' => '', '' => '', '' => '',
- '' => '', '' => '', '' => '', '' => '', '' => '',
- '' => '', '' => '', '' => '', '' => '',
- '' => '', '' => '', '' => '', '' => '',
+ '' => '', '' => '', '' => '', '' => '', '' => '',
+ '' => '', '' => '', '' => '', '' => '', '' => '',
+ '' => '', '' => '', '' => '', '' => '',
+ '' => '', '' => '', '' => '', '' => '',
'' => '', '' => '', '' => '﴿', '' => '', '' => '',
'' => '', '' => '', '' => '', '' => '',
'︿' => '', '' => '', '' => '', '' => '',
- '' => '', '' => '', '' => '', '' => '',
+ '' => '', '' => '', '' => '', '' => '',
'' => '', '' => '', '' => '', '' => '',
);
for keys %ps_pe {
- next if $_ eq '('; # skip '(' => ')' because q() is a sub call
+ next if $_ eq '('; # skip '(' => ')' because q() is a sub call
my $string = 'q' ~ $_ ~ 'abc' ~ %ps_pe{$_};
is eval($string), 'abc', $string ~ sprintf(' (U+%X/U+%X)',$_.ord,%ps_pe{$_}.ord);
}
View
6 S02-literals/quoting.t
@@ -206,7 +206,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(@q[1], '$bar', "...");
};
-{ # whitespace sep aration does not break quote constructor
+{ # whitespace sep aration does not break quote constructor
# L<S02/Literals/Whitespace is allowed between the "q" and its adverb: q :w /.../.>
my @q = ();
@q = (q :w /$foo $bar/);
@@ -217,7 +217,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
#?rakudo skip 'quoting with adverbs'
-{ # qq:w,Interpolating quote constructor with words adverb
+{ # qq:w,Interpolating quote constructor with words adverb
# L<S02/Literals/"Split result on words (no quote protection)">
my (@q1, @q2) = ();
@q1 = qq:w/$foo "gorch $bar"/;
@@ -321,7 +321,7 @@ FOO
{ # Q L<S02/Literals/No escapes at all>
my @q = ();
-
+
my $backslash = "\\";
@q = (Q/foo\\bar$foo/);
View
4 S02-literals/sub-calls.t
@@ -56,14 +56,14 @@ plan 20;
}
{
sub first() { "first" }
-
+
is(eval(q/first.uc/), 'FIRST', '`first.second` means `(first()).second()`');
}
{
is(eval(q/"hello".substr: 1, 2/), "el", "listop method");
- # foo $bar.baz: quux
+ # foo $bar.baz: quux
# should be (and is currently) interpreted as:
# foo($bar.baz(quux))
# where the alternate interpretation can be achieved by:
View
8 S02-magicals/dollar-underscore.t
@@ -1,6 +1,6 @@
use v6;
-# Tests for a bug uncovered when Jesse Vincent was testing
+# Tests for a bug uncovered when Jesse Vincent was testing
# functionality for Patrick Michaud
# TODO: add smartlinks, more tests
@@ -18,20 +18,20 @@ for @list -> $letter { is( $letter , 'a', 'can bind to variable in pointy') }
# Do pointy subs send along an implicit param? No!
for @list -> {
- isnt($_, 'a', '$_ does not get set implicitly if a pointy is given')
+ isnt($_, 'a', '$_ does not get set implicitly if a pointy is given')
}
# Hm. PIL2JS currently dies here (&statement_control:<for> passes one argument
# to the block, but the block doesn't expect any arguments). Is PIL2JS correct?
# Do pointy subs send along an implicit param even when a param is declared? No!
for @list -> $letter {
- isnt( $_ ,'a', '$_ does not get set implicitly if a pointy is given')
+ isnt( $_ ,'a', '$_ does not get set implicitly if a pointy is given')
}
{
my $a := $_; $_ = 30;
- for 1 .. 3 { $a++ };
+ for 1 .. 3 { $a++ };
is $a, 33, 'outer $_ increments' ;
}
View
4 S02-magicals/dollar_bang.t
@@ -12,9 +12,9 @@ This test tests the C<$!> builtin.
# L<S04/"Exceptions"/"A bare die/fail takes $! as the default argument.">
-eval 'nonexisting_subroutine()';
+eval 'nonexisting_subroutine()';
ok defined($!), 'nonexisting sub in eval makes $! defined';
-eval 'nonexisting_subroutine()';
+eval 'nonexisting_subroutine()';
ok $!, 'Calling a nonexisting subroutine sets $!';
undefine $!;
View
2 S02-magicals/file_line.t
@@ -14,5 +14,5 @@ is($?LINE, 10, '$?LINE works');
ok($?FILE eq ('t/spec/S02-magicals/file_line.t' | 't\\spec\\S02-magicals\\file_line.t'), '$?FILE works');
# NOTE:
-# above is a junction hack for Unix and Win32 file
+# above is a junction hack for Unix and Win32 file
# paths until the FileSpec hack is working - Stevan
View
2 S02-magicals/progname.t
@@ -15,6 +15,6 @@ ok(PROCESS::<$PROGRAM_NAME> eq ('t/spec/S02-magicals/progname.t' | 't\\spec\\S02
ok($*PROGRAM_NAME ~~ / t['/'|'\\']spec['/'|'\\']S02'-'magicals['/'|'\\']progname'.'\w+$/, "progname var accessible as context var");
# NOTE:
-# above is a junction hack for Unix and Win32 file
+# above is a junction hack for Unix and Win32 file
# paths until the FileSpec hack is working - Stevan
# changed junction hack in test 2 to regex for Rakudo fudged filename - mberends
View
2 S02-names_and_variables/fmt.t
@@ -13,7 +13,7 @@ plan 19;
is (5.6).fmt('%f'), '5.6', 'fmt() works with %f';
}
-# L<S02/"Names and Variables"/"format an array value"
+# L<S02/"Names and Variables"/"format an array value"
# "supply a second argument">
{
is (1.3,2.4,3).fmt("%d", "_"), "1_2_3", "fmt() works with plain lists";
View
4 S02-names_and_variables/perl.t
@@ -39,13 +39,13 @@ my @tests = (
[ 3..42 ],
# Infinite arrays, commented because they take infram and inftime in
# current Pugs
- #?pugs emit #
+ #?pugs emit #
#?rakudo emit # Inf takes infram and inftime
[ 3..Inf ],
#?pugs emit #
#?rakudo emit # Inf takes infram and inftime
[ -Inf..Inf ],
- #?pugs emit #
+ #?pugs emit #
#?rakudo emit # Inf takes infram and inftime
[ 3..42, 17..Inf, -Inf..5 ],
View
2 S02-names_and_variables/signature.t
@@ -43,7 +43,7 @@ plan 13;
is("$x $y $z", "1 2 3", "siglist bindings works", :todo<feature>);
}
-# Same, but more complex
+# Same, but more complex
#?rakudo skip '.infix:<:=>()'
{
my ($x, @y, @rest);
View
4 S02-names_and_variables/variables-and-packages.t
@@ -22,8 +22,8 @@ ok !eval('module COMPILING; 1'), 'COMPILING is an out of scope name';
{ my $a = 1; {
my $a=2; {
my $a=3;
- is($a, 3, 'get regular a');
- is($OUTER::a, 2, 'get $OUTER::a');
+ is($a, 3, 'get regular a');
+ is($OUTER::a, 2, 'get $OUTER::a');
is($OUTER::OUTER::a, 1, 'get $OUTER::OUTER::a');
}}}
View
4 S02-whitespace_and_comments/comments.t
@@ -119,8 +119,8 @@ plan 45;
# ok eval(" #{ comment }") failes with an error as it tries to execute
# comment() before seeing that I meant #{ comment within this string.
-#?pugs todo
- ok eval(" #<<\n comment\n # >>\n >> 3"),
+#?pugs todo
+ ok eval(" #<<\n comment\n # >>\n >> 3"),
'single line comment cannot correctly nested within multiline', :todo<bug>;
}
View
2 S02-whitespace_and_comments/sub-block-parsing.t
@@ -7,7 +7,7 @@ use Test;
# L<"http://use.perl.org/~autrijus/journal/25365">
# Closure composers like anonymous sub, class and module always trumps hash
# dereferences:
-#
+#
# sub{...}
# module{...}
# class{...}

0 comments on commit 189b4db

Please sign in to comment.