Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Perlito5 - js - use more regular syntax
- Loading branch information
Showing
59 changed files
with
3,124 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Do not edit this file - Generated by Perlito5 9.0 | ||
| use v6; | ||
| { | ||
| package main { | ||
| Any; | ||
| # use feature | ||
| } | ||
| package Main { | ||
| say('1..2'); | ||
| say('ok 1'); | ||
| print('o'); | ||
| say('k 2') | ||
| } | ||
| } | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Do not edit this file - Generated by Perlito5 9.0 | ||
| use v6; | ||
| { | ||
| package main { | ||
| Any; | ||
| # use strict | ||
| # use feature | ||
| } | ||
| package Main { | ||
| say('1..1'); | ||
| say('ok ', 1) | ||
| } | ||
| } | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Do not edit this file - Generated by Perlito5 9.0 | ||
| use v6; | ||
| { | ||
| package main { | ||
| Any; | ||
| # use strict | ||
| # use feature | ||
| } | ||
| package Main { | ||
| say('1..9'); | ||
| my $v = 1 + 0.3; | ||
| if ($v < 1.29) || ($v > 1.31) { | ||
| print('not ') | ||
| } | ||
| say('ok ', 1); | ||
| if ($v ~ '') ne 1.3 { | ||
| print('not ') | ||
| } | ||
| say('ok ', 2, ' # ', $v); | ||
| if ($v + 3.4) ne 4.7 { | ||
| print('not ') | ||
| } | ||
| say('ok ', 3, ' # ', ($v + 3.4)); | ||
| if ($v / 2) != 0.65 { | ||
| print('not ') | ||
| } | ||
| say('ok 4 # ', ($v / 2)); | ||
| if ($v * 2) != 2.6 { | ||
| print('not ') | ||
| } | ||
| say('ok 5 # ', ($v * 2)); | ||
| print('not ') | ||
| if !defined(3.14); | ||
| say('ok 6 - defined num'); | ||
| $v = 3.14; | ||
| print('not ') | ||
| if !defined($v); | ||
| say('ok 7 - defined var'); | ||
| my $y; | ||
| print('not ') | ||
| if defined($y); | ||
| say('ok 8 - undefined var'); | ||
| $v = eval('013.4e2'); | ||
| print('not ') | ||
| if $v != 11400; | ||
| say('ok 9 - octal integer followed by dot') | ||
| } | ||
| } | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Do not edit this file - Generated by Perlito5 9.0 | ||
| use v6; | ||
| { | ||
| package main { | ||
| Any; | ||
| # use strict | ||
| # use feature | ||
| } | ||
| package Main { | ||
| say('1..11'); | ||
| my $x = 1; | ||
| if $x != 1 { | ||
| print('not ') | ||
| } | ||
| say('ok 1 - != ', $x); | ||
| $x = 2; | ||
| if !($x eq 2) { | ||
| print('not ') | ||
| } | ||
| say('ok 2 - ne ', $x); | ||
| $x = 0 ?? 'not ok' !! 'ok'; | ||
| say($x, ' 3 - ternary'); | ||
| $x = 1 ?? 'ok' !! 'not ok'; | ||
| say($x, ' 4 - ternary'); | ||
| print('ok 5 - print with embedded newlines' ~ chr(10) ~ 'ok 6 - more newlines' ~ chr(10)); | ||
| $x = 2; | ||
| if !(($x + 2) == ($x + 1 + 1)) { | ||
| print('not ') | ||
| } | ||
| say('ok 7 - add '); | ||
| $x = 2; | ||
| if !(($x ~ 2) eq 22) { | ||
| print('not ') | ||
| } | ||
| say('ok 8 - concat'); | ||
| my $undef; | ||
| if $undef { | ||
| print('not ') | ||
| } | ||
| say('ok 9 - undef to bool'); | ||
| if !(($undef ~ 2) eq 2) { | ||
| print('not ') | ||
| } | ||
| say('ok 10 - undef to str'); | ||
| $x = 2; | ||
| if !(($x + 2) eq 4) { | ||
| print('not ') | ||
| } | ||
| say('ok 11 - plus with string') | ||
| } | ||
| } | ||
|
|
Oops, something went wrong.