Permalink
Browse files

[t/spec] Add vim: lines everywhere.

perl -e 'my %h;@h{`grep -rl "use v6" t/spec`}=();delete @h{`grep -rl "vim:" t/spec`};print keys %h'
    | grep '\.t$'
    | xargs perl -pi -e 'if (eof) {print "$_\n# vim: ft=perl6\n";$_=""}'

git-svn-id: http://svn.pugscode.org/pugs@27911 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent a921eb1 commit 7f29bc5383174959ee905fad3fb3a7bc8d86edbf kyle committed Aug 8, 2009
Showing 398 changed files with 796 additions and 0 deletions.
@@ -94,3 +94,5 @@ is(@array[0], 3, 'store result');
is(0+$p5array.fetch(0), 3, 'store result');
# TODO: pop, shift, unshift, splice, delete
+
+# vim: ft=perl6
@@ -107,3 +107,5 @@ sub add_in_perl5 ($x, $y) {
}
is(add_in_perl5(42, 42), 84, 'Defining subroutines with "use v5" blocks');
+
+# vim: ft=perl6
@@ -19,3 +19,5 @@ unless (try { eval("1", :lang<perl5>) }) {
or die $!;
}, "perl5:CLASS.new";
}
+
+# vim: ft=perl6
@@ -5,3 +5,5 @@ plan 1;
my $self = "some text";
is ~eval(q/"self is $self"/,:lang<perl5>),"self is some text","lexical inside an eval";
+
+# vim: ft=perl6
@@ -37,3 +37,5 @@ lives_ok( {
my $err = $!;
$err.test;
}, "Accessing Perl5 method doesn't die");
+
+# vim: ft=perl6
@@ -72,3 +72,5 @@ is($p5hash.fetch(5), 'a', 'fetch result');
is($p5hash.my_exists(5), %hash.exists(5), 'exists');
#?pugs todo 'bug'
is($p5hash.my_exists(12), %hash.exists(12), 'nonexists fail');
+
+# vim: ft=perl6
@@ -18,3 +18,5 @@ eval q[
use perl5:Text::Wrap 'wrap';
is(wrap('foo', 'bar', 'baz'), 'foobaz', "import p5 module");
] or die $!.perl;
+
+# vim: ft=perl6
@@ -124,3 +124,5 @@ my $obj;
$obj.modify_array(VAR @rw);
is(@rw[0], 99, 'modify a scalar ref');
}
+
+# vim: ft=perl6
@@ -10,3 +10,5 @@ my $y = 'case';
};
is $x, 'testing', "scalar modified inside perl5 block";
+
+# vim: ft=perl6
@@ -23,3 +23,5 @@ is $x, 'testing', "scalar modified inside perl5 block";
#?pugs todo 'nested p5/p6 embedding'
is $y, 'casebook', "scalar modified inside perl6 block inside perl5 block";
+
+# vim: ft=perl6
@@ -29,3 +29,5 @@ sub get_dmd5 {
}
>>>;
+
+# vim: ft=perl6
@@ -40,3 +40,5 @@ my %hash = (foo => 'bar', hate => 'software');
{
is_deeply([%hash.keys].sort, [$keys_p5(VAR %hash)].sort);
}
+
+# vim: ft=perl6
@@ -125,3 +125,5 @@ is((sub { { 3 } }).(), 3, 'ditto for anonymous subs');
is((sub { { { 3 } } }).(), 3, 'ditto, even if nested');
dies_ok({(sub { { $^x } }).()}, 'implicit params become errors');
isnt((sub { -> { 3 } }).(), 3, 'as are pointies');
+
+# vim: ft=perl6
@@ -310,3 +310,5 @@ my @array2 = ("test", 1, undef);
dies_ok({push @arr, 's'}, 'type constraints on my Type @arr[num] works (1)');
dies_ok({push @arr, 4.2}, 'type constraints on my Type @arr[num] works (2)');
}
+
+# vim: ft=perl6
@@ -87,3 +87,5 @@ plan 16;
ok @a[1] ~~ undef, '... and the second is undef';
is @a[2], 6, '... and the third is 6';
}
+
+# vim: ft=perl6
@@ -46,3 +46,5 @@ my $here;
#?pugs todo 'bug'
is $here, 1, "slice store was redefined";
}
+
+# vim: ft=perl6
@@ -128,3 +128,5 @@ is $array9[1][1][1][0], 42, "recursive array access (3)";
my $arrayref = [$foo];
ok $arrayref[0] !=:= $foo, "creating arrays using [] creates new containers (2)";
}
+
+# vim: ft=perl6
@@ -154,3 +154,5 @@ plan 18;
is +%hash, 1, '%hash<a> = $hashref does not flatten the hashref';
}
+
+# vim: ft=perl6
@@ -63,3 +63,5 @@ sub foo ($baz is rw) {
sub bar ($baz is readonly) {
# readonly signature, should it autovivify?
}
+
+# vim: ft=perl6
@@ -56,3 +56,5 @@ is(++$bool, Bool::True, 'Increment of Bool::True still produces Bool::True');
is(--$bool, Bool::False, 'Decrement of Bool::True produces Bool::False');
is(--$bool, Bool::False, 'Decrement of Bool::False produces Bool::False');
+
+# vim: ft=perl6
@@ -50,3 +50,5 @@ lives_ok( { $ref[0] }, 'Accessing a hash as a list of pairs is fine');
lives_ok { $y = [0, 7] }, 'can assign arrayref to scalar that held an hashref';
}
+
+# vim: ft=perl6
@@ -41,3 +41,5 @@ plan 10;
is($buf8.bytes, 26, '.bytes works on a buf8');
is($buf16.bytes, 26, '.bytes works on a buf16 (and returns the size in bytes)');
}
+
+# vim: ft=perl6
@@ -545,3 +545,5 @@ plan 85;
# TODO FIXME
+
+# vim: ft=perl6
@@ -140,3 +140,5 @@ is %hash.values, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'), '
#?rakudo skip 'RT #63826'
is EnumGrammar::G::b, 1, 'enum element in grammar has the right value';
}
+
+# vim: ft=perl6
@@ -80,3 +80,5 @@ plan 34;
push @a, %foo;
is(@a.elems, 5, 'Hash flattened');
}
+
+# vim: ft=perl6
@@ -182,3 +182,5 @@ ok( $!, "doesn't really make sense, but shouldn't segfault, either ($!)");
# test for RT #62730
lives_ok { Hash.new("a" => "b") }, 'Hash.new($pair) lives';
+
+# vim: ft=perl6
@@ -91,3 +91,5 @@ plan 32;
is %hash<ref><val>, 42, "access to infinite HoHoHoH... (1)";
is %hash<ref><ref><val>, 42, "access to infinite HoHoHoH... (2)";
}
+
+# vim: ft=perl6
@@ -30,3 +30,5 @@ for @inttypes -> $type {
eval_dies_ok("my $type \$var = 42.1", "$type cannot be non-integer");
eval_dies_ok("my $type \$var = NaN", "$type cannot be NaN");
}
+
+# vim: ft=perl6
@@ -220,3 +220,5 @@ is( (1..Inf, (1..Inf).reverse ).perl,
"(1, 2, 3,, ..., 3, 2, 1)",
"end of infinite list is readable" );
+
+# vim: ft=perl6
@@ -141,3 +141,5 @@ plan 21;
class List is also { method rt62836_x { 62836 } };
is <1 2 3>.rt62836_x, 62836, 'call user-declared method in List:: class';
}
+
+# vim: ft=perl6
@@ -120,3 +120,5 @@ is(eval('$multi2[1;2]'), 6, 'got the right value at multi2 index 1,2');
is($multi2[1][0], 4, 'got the right value at multi2 index 1,0');
is($multi2[1][1], 5, 'got the right value at multi2 index 1,1');
is($multi2[1][2], 6, 'got the right value at multi2 index 1,2');
+
+# vim: ft=perl6
@@ -22,3 +22,5 @@ is Inf**0 , 1, "Inf**0 is 1, _not_ NaN";
#?rakudo todo 'truncate(NaN)'
ok truncate(NaN) ~~ NaN, 'truncate(NaN) ~~ NaN';
+
+# vim: ft=perl6
@@ -32,3 +32,5 @@ plan 8;
is(+@d, 1, 'Array length, nested (), outer []s');
is(+$d, 4, 'Array object length, nested (), outer []s');
}
+
+# vim: ft=perl6
@@ -21,3 +21,5 @@ is($list.value.key, 2, 'the list.value.key is 2');
isa_ok($list.value.value, Pair, '$list.value.value is-a Pair');
is($list.value.value.key, 3, 'the list.value.value.key is 3');
is($list.value.value.value, 4, 'the list.value.value.value is 4');
+
+# vim: ft=perl6
@@ -18,3 +18,5 @@ plan 6;
ok $n ~~ Failure, 'variable holding nil ~~ Failure';
is $n.WHAT, 'Failure()', '.WHAT on Nil variable says Failure';
}
+
+# vim: ft=perl6
@@ -152,3 +152,5 @@ is(4_2.0_1, 42.01, 'single underscores are ok');
is 0_1, 1, "0_1 is parsed as 0d1";
is +^1, -2, '+^1 == -2 as promised';
+
+# vim: ft=perl6
@@ -360,3 +360,5 @@ Note, "non-chaining binary" was later renamed to "structural infix".
eval_lives_ok '(a => [])', 'can parse "(a => [])"';
lives_ok { (a => []) }, 'can execute "(a => [])"';
}
+
+# vim: ft=perl6
@@ -13,3 +13,5 @@ is (try { Bool::False or 42 }), 42, "Bool::False as LHS";
is (try { 42 or False }), 42, "False as RHS";
is (try { False or 42 }), 42, "False as LHS";
+
+# vim: ft=perl6
@@ -114,3 +114,5 @@ ok &baz.does(Callable), 'a rule does Callable';
macro quux {}
#?pugs todo 'feature'
ok &quux.does(Callable), 'a rule does Callable';
+
+# vim: ft=perl6
@@ -55,3 +55,5 @@ plan 8;
is @array[3], 16, 'context inside of array subscripts when used with &postfix:<++>';
is %hash<c>, 24, 'context inside of hash subscripts when used with &postfix:<++>';
}
+
+# vim: ft=perl6
@@ -147,3 +147,5 @@ my $baz of Int;
ok List ~~ Positional, 'A List does Positional';
ok Array ~~ Positional, 'Array does Positional too';
}
+
+# vim: ft=perl6
@@ -58,3 +58,5 @@ plan 12;
#?rakudo todo 'Array interpolation b0rked'
is "@array[]", "a\t b c", "array whose elements do contain whitespace stringify correctly (3-2)";
}
+
+# vim: ft=perl6
@@ -29,3 +29,5 @@ is "\c[LATIN CAPITAL LETTER A, COMBINING GRAVE ACCENT]", "\x[0041,0300]", 'lette
#?rakudo skip 'RT #64918'
ok "\c[LATIN SMALL LETTER A WITH DIAERESIS,COMBINING CEDILLA]" ~~ /\w/,
'RT #64918 (some strings throw "Malformed UTF-8 string" errors';
+
+# vim: ft=perl6
@@ -85,3 +85,5 @@ is("\c65,66,67", 'A,66,67', '\clist not valid');
eval_dies_ok q{"\05"}, 'next char of \0 is 5';
eval_dies_ok q{"\07"}, 'next char of \0 is 7';
}
+
+# vim: ft=perl6
@@ -61,3 +61,5 @@ is(
ok($z, 'eval was *really* ok');
is($y, $expected, 'fmt and code interpolation behave well');
+
+# vim: ft=perl6
@@ -39,3 +39,5 @@ plan 10;
is "%hash{'b'}", "b", 'can quote hash indexes in interpolations 1';
is "%hash{"b"}", "b", 'can quote hash indexes in interpolations 2';
}
+
+# vim: ft=perl6
View
@@ -21,3 +21,5 @@ plan 4;
}
}
+
+# vim: ft=perl6
@@ -90,3 +90,5 @@ is("x \c[65,66,000067] x", "x ABC x", "\\c[] allows multiple chars (2)");
is("x \x[41,42,43]] x", "x ABC] x", "\\x[] should not eat following ]s");
is("x \c[65,66,67]] x", "x ABC] x", "\\c[] should not eat following ]s");
+
+# vim: ft=perl6
@@ -30,3 +30,5 @@ plan 6;
is $true_pair ?? 1 !! 0, 1, 'Ternary on a true pair returns first option';
is $false_pair ?? 1 !! 0, 1, 'Ternary on a false pair returns first option too';
}
+
+# vim: ft=perl6
View
@@ -136,3 +136,5 @@ sub f9 (:$bar!) { WHAT($bar) }
dies_ok { f9($arrayref => 42) },
"variables cannot be keys of syntactical pairs (3)";
}
+
+# vim: ft=perl6
View
@@ -54,3 +54,5 @@ plan 5;
=begin DATA
hello, world!
=end DATA
+
+# vim: ft=perl6
@@ -73,3 +73,5 @@ RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER(U+298D/U+298E)';
$var = @list[q〈1〉];
is $var, 'b', 'q-style string with LEFT/RIGHT ANGLE BRACKET';
}
+
+# vim: ft=perl6
View
@@ -529,3 +529,5 @@ Hello, World
is('test\\', "test\\", "backslashes at end of single quoted string");
is 'a\\b\''.chars, 4, 'backslash and single quote';
}
+
+# vim: ft=perl6
@@ -27,3 +27,5 @@ plan 8;
ok "$a" ~~ Str, '"$a" results in a Str';
ok "{3}" ~~ Str, '"{3}" results in a Str';
}
+
+# vim: ft=perl6
View
@@ -72,3 +72,5 @@ plan 20;
# $bar.baz.foo(quux)
# but we need tests, tests, tests! XXX
}
+
+# vim: ft=perl6
@@ -50,3 +50,5 @@ ok 2.1_23 == 2.123, "2.1_23 parses as number";
dies_ok { 2._foo }, "2._foo parses as method call";
dies_ok { 2._123 }, "2._123 parses as method call";
dies_ok { 2._e23 }, "2._23 parses as method call";
+
+# vim: ft=perl6
View
@@ -27,3 +27,5 @@ my $osnames = any <darwin linux FreeBSD MSWin32 mingw msys cygwin browser>;
ok $?OS eq $osnames, "we know of the OS we were compiled in";
ok $*OS eq $osnames, "we know of the OS we are running under";
+
+# vim: ft=perl6
View
@@ -139,3 +139,5 @@ ok !%*ENV.exists("does_not_exist"), "exists() returns false on a not defined env
ok $! ~~ m:P5/Undeclared/, '%ENV not visible by after lexical import scope';
1;
}
+
+# vim: ft=perl6
View
@@ -16,3 +16,5 @@ ok($?FILE eq ('t/spec/S02-magicals/file_line.t' | 't\\spec\\S02-magicals\\file_l
# NOTE:
# above is a junction hack for Unix and Win32 file
# paths until the FileSpec hack is working - Stevan
+
+# vim: ft=perl6
View
@@ -13,3 +13,5 @@ ok $*OS, '$*OS is present';
ok $?OSVER, '$?OSVER is present';
ok $*OSVER, '$*OSVER is present';
+
+# vim: ft=perl6
View
@@ -39,3 +39,5 @@ $child_pid .= chomp;
unlink $tempfile;
ok $*PID ne $child_pid, "My PID differs from the child pid ($*PID != $child_pid)";
+
+# vim: ft=perl6
View
@@ -18,3 +18,5 @@ ok($*PROGRAM_NAME ~~ / t['/'|'\\']spec['/'|'\\']S02'-'magicals['/'|'\\']progname
# 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
+
+# vim: ft=perl6
View
@@ -27,3 +27,5 @@ is($result3, 6, 'the &?ROUTINE magical works correctly in overloaded operators'
my $baz = try { &?ROUTINE };
ok(defined($baz), '&?ROUTINE is defined for the MAIN routine');
+
+# vim: ft=perl6
View
@@ -22,3 +22,5 @@ is($bar(), '<anon>', 'got the right routine name (anon-block)');
my $baz = try { &?ROUTINE.name };
ok(not(defined $baz), '&?ROUTINE.name not defined outside of a routine');
+
+# vim: ft=perl6
View
@@ -177,3 +177,5 @@ Larry ruled that as erroneous.
}
=end pod
+
+# vim: ft=perl6
View
@@ -25,3 +25,5 @@ plan 7;
#?rakudo skip 'OUR::subname() does not work'
is OUR::c(), 'sub c', 'sub c called with OUR:: works';
}
+
+# vim: ft=perl6
Oops, something went wrong.

0 comments on commit 7f29bc5

Please sign in to comment.