Permalink
Browse files

ChangeLog update; more tests

  • Loading branch information...
1 parent 16eb542 commit c0e190a491cd00eeb718ef4cd6b031a78a88aad9 @fglock committed Apr 5, 2011
Showing with 35 additions and 9 deletions.
  1. +4 −3 ChangeLog
  2. +2 −1 lib/Perlito/Javascript/Runtime.js
  3. +2 −0 lib/Perlito/Python/Runtime.py
  4. +2 −1 lib5/Perlito/Javascript/Runtime.js
  5. +6 −1 t/05-for.t
  6. +11 −1 t/05-if.t
  7. +5 −1 t/05-while.t
  8. +3 −1 t/06-bool.t
View
@@ -1,5 +1,6 @@
-dev version - 2010-09-01
-- backends pending upgrade to the new AST: Go, Common Lisp, Python 2, and Ruby 1.9, Eval
+dev version - 2011-04-05
+- supported backends: Perl 5, Python 2, Javascript
+- backends pending upgrade to the new AST: Go, Common Lisp, Ruby 1.9, Eval
- backends not supported in this version: Parrot, Rakudo, Clojure
- new option "-Bipy", run in .Net using Iron Python
@@ -8,7 +9,7 @@ dev version - 2010-09-01
This replaces Pugs::Compiler::Perl5 as the v6.pm compiler in CPAN.
- correct operator precedence
- interpolation of variables and code in strings
-- 'unless'
+- 'unless' and statement modifiers
- several fixes in List, Hash, Array, Block, Bool, Str, Mu
- operators: numeric autoincrements, defined-or, range
@@ -123,6 +123,7 @@ if (typeof f_print != 'function') {
buf = buf + s;
}
}
+ return true;
}
}
if (typeof f_say != 'function') {
@@ -131,7 +132,7 @@ if (typeof f_say != 'function') {
for (i = 0; i < f_say.arguments.length; i++) {
f_print( f_say.arguments[i] );
}
- f_print("\n");
+ return f_print("\n");
}
}
if (typeof f_die != 'function') {
@@ -39,11 +39,13 @@
def mp6_print(*msg):
for m in msg:
sys.stdout.write(str(m))
+ return 1;
def mp6_say(*msg):
for m in msg:
sys.stdout.write(str(m))
sys.stdout.write("\n")
+ return 1;
def mp6_warn(*msg):
for m in msg:
@@ -123,6 +123,7 @@ if (typeof f_print != 'function') {
buf = buf + s;
}
}
+ return true;
}
}
if (typeof f_say != 'function') {
@@ -131,7 +132,7 @@ if (typeof f_say != 'function') {
for (i = 0; i < f_say.arguments.length; i++) {
f_print( f_say.arguments[i] );
}
- f_print("\n");
+ return f_print("\n");
}
}
if (typeof f_die != 'function') {
View
@@ -1,7 +1,7 @@
use v6;
class Main {
- say '1..11';
+ say '1..13';
my @a = ( 1, 2 );
for @a -> $v {
say 'ok ' ~ $v ~ ' - loop';
@@ -35,4 +35,9 @@ class Main {
for @a {
say "ok $_ - default variable";
}
+
+ @a[0] = 12;
+ @a[1] = 13;
+ say "ok $_ - default variable in statement modifier"
+ for @a;
}
View
@@ -1,7 +1,7 @@
use v6;
class Main {
- say '1..7';
+ say '1..9';
if 0 {
print 'not '
@@ -45,4 +45,14 @@ class Main {
}
say 'ok 7';
+ say 'not ok 8'
+ unless 1;
+ say 'ok 8'
+ unless 0;
+
+ say 'not ok 9'
+ if 0;
+ say 'ok 9'
+ if 1;
+
}
View
@@ -1,7 +1,7 @@
use v6;
class Main {
- say '1..3';
+ say '1..5';
my $a = 4;
my $b = 0;
while $a {
@@ -16,4 +16,8 @@ class Main {
while @x {
say "ok ", (shift @x);
}
+
+ @x = ( 4, 5 );
+ say "ok ", (shift @x)
+ while @x;
}
View
@@ -1,7 +1,7 @@
use v6;
class Main {
- say '1..30';
+ say '1..31';
say ( 0 ?? "not " !! "" ), "ok 1 - integer";
say ( 1 ?? "" !! "not " ), "ok 2";
@@ -61,5 +61,7 @@ class Main {
say (( 0 && 20 ) == 0 ?? "" !! "not "), "ok 28";
say (( "" || "x" ) eq "x" ?? "" !! "not "), "ok 29";
say (( "" && "x" ) eq "" ?? "" !! "not "), "ok 30";
+
+ say "ok 31" or die "not ok 31";
}

0 comments on commit c0e190a

Please sign in to comment.