Permalink
Browse files

[t/spec] 71 typos in 32 files.

git-svn-id: http://svn.pugscode.org/pugs@28693 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 9305b95 commit 13cc9c44b06b8caa8391867c5f8799f0f2401413 Util committed Oct 9, 2009
@@ -18,24 +18,24 @@ is(%hash1{'one'}, 4, 'lvalue hash re-assignment works (w/ single quoted keys)');
%hash1<three> = 3;
is(%hash1<three>, 3, 'lvalue hash assignment works (w/ unquoted style <key>)');
-# basic hash creation w/ comma seperated key/values
+# basic hash creation w/ comma separated key/values
my %hash2 = ("one", 1);
isa_ok(%hash2, Hash);
-is(%hash2{"one"}, 1, 'comma seperated key/value hash creation works');
+is(%hash2{"one"}, 1, 'comma separated key/value hash creation works');
is(%hash2<one>, 1, 'unquoted <key> fetching works');
my %hash3 = ("one", 1, "two", 2);
isa_ok(%hash3, Hash);
-is(%hash3{"one"}, 1, 'comma seperated key/value hash creation works with more than one pair');
-is(%hash3{"two"}, 2, 'comma seperated key/value hash creation works with more than one pair');
+is(%hash3{"one"}, 1, 'comma separated key/value hash creation works with more than one pair');
+is(%hash3{"two"}, 2, 'comma separated key/value hash creation works with more than one pair');
-# basic hash creation w/ => seperated key/values (pairs?)
+# basic hash creation w/ => separated key/values (pairs?)
my %hash4;
isa_ok(%hash4, Hash);
%hash4 = ("key" => "value");
-is(%hash4{"key"}, 'value', '(key => value) seperated key/value has creation works');
+is(%hash4{"key"}, 'value', '(key => value) separated key/value has creation works');
# hash slicing
@@ -22,21 +22,21 @@ plan 32;
is $hash<3rd>, 3, 'lvalue hash assignment works (w/ unquoted style <key>)';
}
-# basic hash creation w/ comma seperated key/values
+# basic hash creation w/ comma separated key/values
{
my $hash = hash("1st", 1);
isa_ok $hash, Hash;
- is $hash{"1st"}, 1, 'comma seperated key/value hash creation works';
+ is $hash{"1st"}, 1, 'comma separated key/value hash creation works';
is $hash<1st>, 1, 'unquoted <key> fetching works';
}
{
my $hash = hash("1st", 1, "2nd", 2);
isa_ok $hash, Hash;
is $hash{"1st"}, 1,
- 'comma seperated key/value hash creation works with more than 1st pair';
+ 'comma separated key/value hash creation works with more than 1st pair';
is $hash{"2nd"}, 2,
- 'comma seperated key/value hash creation works with more than 1st pair';
+ 'comma separated key/value hash creation works with more than 1st pair';
}
# hash slicing
@@ -44,7 +44,7 @@ is(
'fmt and code interpolation behave well'
);
-# These tests actually excercise what's a bug in eval() IMHO -- polettix
+# These tests actually exercise what's a bug in eval() IMHO -- polettix
my $z;
my $expected = 'hex-formatted ord of $x is 41';
is(
View
@@ -222,7 +222,7 @@ is( :2<1.1> * :2<10> ** :2<10>, 6, 'multiplication and exponentiatio
is +":16<DeAdBeEf>", 0xDEADBEEF, "radix 16 notation works";
is +":32<2q>", 90, "radix 32 notation works";
is +":100<1e>", 114, "high order radix (limited alphabet) works";
- is +":1_0<14_56>", 1456, "underscore seperators works";
+ is +":1_0<14_56>", 1456, "underscore separators works";
is +":10<123.456>", 123.456, "base 10 decimal notation works";
is +":2<1.111>", 1.875, "base 2 decimal notation works";
is +":16<dead_beef.face>", 0xDEADBEEF + 0xFACE / 65536.0, "fractional base 16 works";
@@ -238,10 +238,10 @@ is( :2<1.1> * :2<10> ** :2<10>, 6, 'multiplication and exponentiatio
is +":10<12f>", 0, "invalid alphabet parsefail works";
is +":1b<10>", 0, "invalid radix alphabet parsefail works";
is +":10<>", 0, "missing radix conversion number parsefail works";
- is +":_2<01>", 0, "underscore seperator misuse parsefail works (1)";
- is +":2<_01>", 0, "underscore seperator misuse parsefail works (2)";
- is +":2<01_>", 0, "underscore seperator misuse parsefail works (3)";
- is +":_2_<_0_1_>_", 0, "underscore seperator misuse parsefail works (4)";
+ is +":_2<01>", 0, "underscore separator misuse parsefail works (1)";
+ is +":2<_01>", 0, "underscore separator misuse parsefail works (2)";
+ is +":2<01_>", 0, "underscore separator misuse parsefail works (3)";
+ is +":_2_<_0_1_>_", 0, "underscore separator misuse parsefail works (4)";
is +":2<1.3>", 0, "invalid radix conversion alphabet parsefail works";
is +"0b1.1e10", 1, "0b1.1e10 parses as 0b1";
is +":2<10dlk", 0, "missing closing angle bracket";
View
@@ -47,7 +47,7 @@ my ($redir,$squo) = (">", "'");
my $expected = 'Hello from subprocess';
%*ENV<PUGS_ROCKS> = $expected;
-# Note that the "?" preceeding the "(" is necessary, because we need a Bool,
+# Note that the "?" preceding the "(" is necessary, because we need a Bool,
# not a junction of Bools.
is %*ENV<PUGS_ROCKS>, $expected,'%*ENV is rw';
@@ -18,7 +18,7 @@ subset Even of Int where { $_ % 2 == 0 };
};
eval_dies_ok 'my Even $x = 3',
- "Can't assing value that violates type constraint via subst";
+ "Can't assign value that violates type constraint via subset";
{
ok 2 ~~ Even, 'Can smartmatch against subsets 1';
@@ -116,7 +116,7 @@ plan 45;
) 3, 'comments can be nested with same brackets';
# TODO:
- # ok eval(" #`{ comment }") failes with an error as it tries to execute
+ # ok eval(" #`{ comment }") fails with an error as it tries to execute
# comment() before seeing that I meant #`{ comment within this string.
#?pugs todo 'bug'
View
@@ -21,7 +21,7 @@ sub jok(Object $condition, $msg?) { ok ?($condition), $msg };
# L<S09/Junctions>
{
- # initalize them all to empty strings
+ # initialize them all to empty strings
my $a = '';
my $b = '';
my $c = '';
@@ -79,7 +79,7 @@ sub jok(Object $condition, $msg?) { ok ?($condition), $msg };
# same tests, but with junctions as variables
{
- # initalize them all to empty strings
+ # initialize them all to empty strings
my $a = '';
my $b = '';
my $c = '';
@@ -163,7 +163,7 @@ plan 64;
is ~(%hash<0>:v), "A",
":v on a hash returned the correct one-elem array";
- lives_ok {%hash<0>:v = "a"}, 'can assing to %hash<0>:v';
+ lives_ok {%hash<0>:v = "a"}, 'can assign to %hash<0>:v';
is %hash<0>, "a",
":v on a hash returns lvalues (like normal subscripts do as well)";
@@ -74,9 +74,9 @@ plan 19;
LEAVE { $str ~= $x }
}
is is_even(3), 0, 'basic sanity check (1)';
- is $str, '3', 'LEAVE executed at the 1st explict return';
+ is $str, '3', 'LEAVE executed at the 1st explicit return';
is is_even(2), 1, 'basic sanity check (2)';
- is $str, '32', 'LEAVE executed at the 2nd explict return';
+ is $str, '32', 'LEAVE executed at the 2nd explicit return';
}
# normal closure:
@@ -14,7 +14,7 @@ plan 18;
{
# test with implicit $_
my $f2 = { .sqrt };
- is_approx $f2(4), 2, 'Block with implict $_ has one formal parameter';
+ is_approx $f2(4), 2, 'Block with implicit $_ has one formal parameter';
}
{
View
@@ -183,7 +183,7 @@ my $z = 42;
#?rakudo todo 'initialization of vars happens too early'
ok eval_elsewhere('!$y.defined'),
- '... but initializiation of variables might still happen afterwards';
+ '... but initialization of variables might still happen afterwards';
# don't remove this line, or eval() will complain about
# $y not being declared
@@ -20,7 +20,7 @@ $fh.say("abc\n123\nxyz");
$fh.close();
is(~Foo.parsefile("parse_and_parsefile_test"), "123", ".parsefile method invokes TOP rule");
dies_ok({ Bar.parsefile("parse_and_parsefile_test") }, "dies if no TOP rule");
-dies_ok({ Foo.parsefile("non_existant_file") }, "dies if file not found");
+dies_ok({ Foo.parsefile("non_existent_file") }, "dies if file not found");
unlink("parse_and_parsefile_test");
grammar A::B {
View
@@ -1601,19 +1601,19 @@ ok '123456' ~~ /:x(3) \d/, 'repetition (:x)';
#?pugs todo 'feature'
ok '123456' ~~ /:x(0) \d/, 'repetition (:x)';
-#### :nth(3) a \d a1a2a3 y nth occurance (:nth)
+#### :nth(3) a \d a1a2a3 y nth occurrence (:nth)
#?pugs todo 'feature'
-ok 'a1a2a3' ~~ /:nth(3) a \d/, 'nth occurance (:nth)';
+ok 'a1a2a3' ~~ /:nth(3) a \d/, 'nth occurrence (:nth)';
# todo :pge<feature>
-#### :nth(4) a \d a1a2a3 n nth occurance (:nth)
+#### :nth(4) a \d a1a2a3 n nth occurrence (:nth)
#?rakudo todo 'unknown'
-ok 'a1a2a3' !~~ /:nth(4) a \d/, 'nth occurance (:nth)';
+ok 'a1a2a3' !~~ /:nth(4) a \d/, 'nth occurrence (:nth)';
# todo :pge<feature>
-#### :nth(0) a \d a1a2a3 n nth occurance (:nth)
+#### :nth(0) a \d a1a2a3 n nth occurrence (:nth)
#?rakudo todo 'unknown'
-ok 'a1a2a3' !~~ /:nth(0) a \d/, 'nth occurance (:nth)';
+ok 'a1a2a3' !~~ /:nth(0) a \d/, 'nth occurrence (:nth)';
#### :s^[\d+ ]* abc 11 12 13 abc y <?ws> before closing bracket
ok '11 12 13 abc' ~~ /:s^[\d+ ]* abc/, '<?ws> before closing bracket';
View
@@ -5,7 +5,7 @@ plan 21;
=begin description
-Rakudo had a bug which caused failures when a regex match happend inside the
+Rakudo had a bug which caused failures when a regex match happened inside the
body of a C<while> loop.
See L<See http://rt.perl.org/rt3/Ticket/Display.html?id=58306>.
@@ -21,7 +21,7 @@ ok index(~(try { caller.file }), "caller") >= 0, "caller.file works";
sub call_line { caller.line };
is call_line(), 22, "caller.line works";
-# pugs: caller exposes a bug in the MMD mechanism where directy using autogenerated
+# pugs: caller exposes a bug in the MMD mechanism where directly using autogenerated
# accessors on an object returned by a factory, rather than storing the object
# in an intermediate variable, works only when you chain methods with an
# explicit () between them: caller().subname - ok; caller.subname - error.
@@ -8,7 +8,7 @@ plan *;
sub a($x, Int $y?, :$z) { };
isa_ok &a.signature.params, List, '.params is a List';
my @l = &a.signature.params;
- ok ?(all(@l) ~~ Parameter), 'And all items are Paramters';
+ ok ?(all(@l) ~~ Parameter), 'And all items are Parameters';
is +@l, 3, 'we have three of them';
is ~(@l>>.name), '$x $y $z', 'can get the names with sigils';
ok @l[0].type === Any, 'Could get first type';
@@ -11,7 +11,7 @@ plan 78;
return $x;
}
is a(3), 3, 'Can pass positional arguments';
- eval_dies_ok('a(g=>7)', 'Dies on passing superflous arguments');
+ eval_dies_ok('a(g=>7)', 'Dies on passing superfluous arguments');
}
{
View
@@ -35,7 +35,7 @@ is Simple::Bar.new.baz, 'hi', 'class test';
# change to match likely error (top of file) when passes
{
- eval_dies_ok 'Empty::no_such_sub()', 'Non-existant sub through package';
+ eval_dies_ok 'Empty::no_such_sub()', 'Non-existent sub through package';
}
# Not sure whether you should be able to access something in package this way
@@ -18,7 +18,7 @@ class Foo {
lives_ok { Foo.new.m1(1, :x<1>, :y<2>) }, 'implicit *%_ means we can pass extra nameds';
ok &Foo::m1.signature.perl ~~ /'*%_'/, '*%_ shows up in .perl of the Signature';
lives_ok { Foo.new.m2(1, :x<1>, :y<2>) }, 'explicit *%_ means we can pass extra nameds';
-ok &Foo::m2.signature.perl !~~ /'*%_'/, 'With explict one, *%_ not in .perl of the Signature';
+ok &Foo::m2.signature.perl !~~ /'*%_'/, 'With explicit one, *%_ not in .perl of the Signature';
class Bar is Foo is hidden {
method m1($a) {
@@ -27,7 +27,7 @@ class Bar is Foo is hidden {
}
#?rakudo todo 'Parrot bug sees us not complaining about uncaptured named parameters'
-dies_ok { Bar.new.m1(1, :x<1>, :y<2>) }, 'is hidden means no implict *%_';
+dies_ok { Bar.new.m1(1, :x<1>, :y<2>) }, 'is hidden means no implicit *%_';
ok &Bar::m1.signature.perl !~~ /'*%_'/, '*%_ does not show up in .perl of the Signature';
View
@@ -44,7 +44,7 @@ enum Day <Sun Mon Tue Wed Thu Fri Sat>;
{
# usually we don't test explicit value for .perl, but here
- # it's specced, so we make an excpetion
+ # it's specced, so we make an exception
is Day::Mon.perl, 'Day::Mon', '.perl on long form of Enum value';
is Mon.perl, 'Day::Mon', '.perl on short form of Enum value';
@@ -12,13 +12,13 @@ class Something {
}
my $obj = Something.new();
-lives_ok { $obj.doit(3) }, "'is default' trait makes otherwise ambigous method dispatch live";
+lives_ok { $obj.doit(3) }, "'is default' trait makes otherwise ambiguous method dispatch live";
is $obj.doit(3), 9, "'is default' trait tie-breaks on method dispatch";
multi sub doit_sub(Int $x) { 2 * $x };
multi sub doit_sub(Int $x) is default { 3 * $x };
-lives_ok { doit_sub(3) }, "'is default' trait makes otherwise ambigous method dispatch live";
+lives_ok { doit_sub(3) }, "'is default' trait makes otherwise ambiguous method dispatch live";
is doit_sub(3), 9, "'is default' trait on subs";
multi sub slurpy() is default { return 'a' };
@@ -85,12 +85,12 @@ class T2
@c.shift();
$o.called = 0;
- is $o.@c, 'p~q', 'got result from method we defered to';
+ is $o.@c, 'p~q', 'got result from method we deferred to';
is $o.called, 2, 'called total two methods during dispatch';
@c.unshift(&T3::m4);
$o.called = 0;
- is $o.@c, 'p~q', 'got result from method we defered to, via call';
+ is $o.@c, 'p~q', 'got result from method we deferred to, via call';
is $o.called, 3, 'called total three methods during dispatch';
}
View
@@ -22,11 +22,11 @@ my $o = T.new(:a<x>, :b<y>);
is $o.l1, 'x', 'lvalue method as rvalue with explicit return';
is $o.l2, 'y', 'lvalue method as rvalue with implicit return';
-lives_ok { $o.l1 = 3 }, 'can assign to the lvalue method (explict return)';
+lives_ok { $o.l1 = 3 }, 'can assign to the lvalue method (explicit return)';
is $o.l1, 3, '... and the assignment worked';
is $o.a, 3, '...also to the attribute';
-lives_ok { $o.l2 = 4 }, 'can assign to the lvalue method (implict return)';
+lives_ok { $o.l2 = 4 }, 'can assign to the lvalue method (implicit return)';
is $o.l2, 4, '... and the assignment worked';
is $o.b, 4, '...also to the attribute';
View
@@ -54,25 +54,25 @@ if $*OS eq any <MSWin32 mingw msys cygwin> {
ok not "t".IO ~~ :f, "~~:f returns false on directories";
ok "t".IO ~~ :r, "~~:r returns true on a readable directory";
-ok 'doesnotexist'.IO !~~ :d, "~~:d returns false on non existant directories";
-ok 'doesnotexist'.IO !~~ :r, "~~:r returns false on non existant directories";
-ok 'doesnotexist'.IO !~~ :w, "~~:w returns false on non existant directories";
-ok 'doesnotexist'.IO !~~ :x, "~~:x returns false on non existant directories";
-ok 'doesnotexist'.IO !~~ :f, "~~:f returns false on non existant directories";
-
-ok not 'doesnotexist.t'.IO ~~ :f, "~~:f returns false on non existant files";
-ok not 'doesnotexist.t'.IO ~~ :r, "~~:r returns false on non existant files";
-ok not 'doesnotexist.t'.IO ~~ :w, "~~:w returns false on non existant files";
-ok not 'doesnotexist.t'.IO ~~ :x, "~~:x returns false on non existant files";
-ok not 'doesnotexist.t'.IO ~~ :f, "~~:f returns false on non existant files";
+ok 'doesnotexist'.IO !~~ :d, "~~:d returns false on non-existent directories";
+ok 'doesnotexist'.IO !~~ :r, "~~:r returns false on non-existent directories";
+ok 'doesnotexist'.IO !~~ :w, "~~:w returns false on non-existent directories";
+ok 'doesnotexist'.IO !~~ :x, "~~:x returns false on non-existent directories";
+ok 'doesnotexist'.IO !~~ :f, "~~:f returns false on non-existent directories";
+
+ok not 'doesnotexist.t'.IO ~~ :f, "~~:f returns false on non-existent files";
+ok not 'doesnotexist.t'.IO ~~ :r, "~~:r returns false on non-existent files";
+ok not 'doesnotexist.t'.IO ~~ :w, "~~:w returns false on non-existent files";
+ok not 'doesnotexist.t'.IO ~~ :x, "~~:x returns false on non-existent files";
+ok not 'doesnotexist.t'.IO ~~ :f, "~~:f returns false on non-existent files";
# XXX - Without parens, $*PROGRAM_NAME ~~ :s>42 is chaincomp.
-ok(($*PROGRAM_NAME~~:s) > 42, "~~:s returns size on existant files");
+ok(($*PROGRAM_NAME~~:s) > 42, "~~:s returns size on existent files");
-ok not "doesnotexist.t".IO ~~ :s, "~~:s returns false on non existant files";
+ok not "doesnotexist.t".IO ~~ :s, "~~:s returns false on non-existent files";
-ok not $*PROGRAM_NAME.IO ~~ :z, "~~:z returns false on existant files";
-ok not "doesnotexist.t".IO ~~ :z, "~~:z returns false on non existant files";
+ok not $*PROGRAM_NAME.IO ~~ :z, "~~:z returns false on existent files";
+ok not "doesnotexist.t".IO ~~ :z, "~~:z returns false on non-existent files";
ok not "t".IO ~~ :z, "~~:z returns false on directories";
my $fh = open("empty_file", :w);
View
@@ -18,7 +18,7 @@ my $self = 't/spec/S16-unfiled/slurp.t';
}
{
- dies_ok { slurp "does-not-exist" }, "slurp() on not-existant files fails";
+ dies_ok { slurp "does-not-exist" }, "slurp() on non-existent files fails";
}
{
View
@@ -70,7 +70,7 @@ plan 29;
{
my @pop;
- ok(!defined(@pop.pop()), 'pop on an un-initalized array returns undef');
+ ok(!defined(@pop.pop()), 'pop on an un-initialized array returns undef');
}
# testing some error cases
View
@@ -41,9 +41,9 @@ sub gen_hash {
%h<none> = 0;
%h<one> = 1;
%h<nothing> = undef;
- is %h.exists('none'), 1, "Existance of single key with 0 as value: none";
- is %h.exists('one'), 1, "Existance of single key: one";
- is %h.exists('nothing'), 1, "Existance of single key with undef as value: nothing";
+ is %h.exists('none'), 1, "Existence of single key with 0 as value: none";
+ is %h.exists('one'), 1, "Existence of single key: one";
+ is %h.exists('nothing'), 1, "Existence of single key with undef as value: nothing";
is defined(%h<none>), 1, "Defined 0 value for key: none";
is defined(%h<one>), 1, "Defined 1 value for key: one";
ok !defined(%h<nothing>), "NOT Defined value for key: nothing";
Oops, something went wrong.

0 comments on commit 13cc9c4

Please sign in to comment.