Permalink
Browse files

[cl-backend] added simple tests for testing the cl-backend

  • Loading branch information...
1 parent c12c681 commit 48b74aaf6b0b0ee6ecd553c9cac34c3c59e77c6a @pmurias pmurias committed Feb 7, 2011
View
@@ -0,0 +1,6 @@
+say "1..1";
+sub say-it($arg) {
+ say "foo";
+ say $arg;
+}
+say-it("ok 1");
View
@@ -0,0 +1,3 @@
+say "1..1";
+my $ok1 = "ok 1";
+say $ok1;
@@ -0,0 +1,4 @@
+say "1..1";
+my $foo;
+$foo := "ok 1";
+say $foo;
View
@@ -0,0 +1,24 @@
+say "1..4";
+my $foo;
+my $bar;
+$bar := $foo;
+$foo = "ok 1";
+say $bar;
+
+$foo := "ok 2";
+$bar := $foo;
+say $bar;
+
+my $c = "ok 3 # binding a variable to itself";
+$c := $c;
+say $c;
+
+my $a;
+my $b;
+$a = "ok 4";
+$b := $a;
+$a := $b;
+say $a;
+
+
+
View
@@ -0,0 +1,2 @@
+say "1..1";
+say "o","k";
View
@@ -0,0 +1,2 @@
+say "1..1";
+say "ok 1";
View
@@ -0,0 +1,7 @@
+say "1..1";
+if 1 {
+ say "ok";
+}
+if 0 {
+ say "not ok";
+}
@@ -0,0 +1,15 @@
+say "1..2";
+class Foo {
+ method foo {
+ say "ok 1 ";
+ }
+}
+class Bar {
+ method bar {
+ say "ok 2";
+ }
+}
+my $foo = Foo.new();
+my $bar = Bar.new();
+$foo.foo();
+$bar.bar();
@@ -0,0 +1,8 @@
+say "1..1";
+sub notok1 {
+ say "not ok1";
+}
+sub ok1 {
+ say "ok 1";
+}
+ok1();

0 comments on commit 48b74aa

Please sign in to comment.