-
-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-add tests for Never, Pony, Ring, and Spry
- Loading branch information
1 parent
09bd453
commit 854fc4d
Showing
10 changed files
with
55 additions
and
85 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 |
---|---|---|
@@ -1,17 +1,4 @@ | ||
|
||
func print_str(hw[L] -> int) -> int | ||
{ | ||
func __print(hw[L] -> int, i -> int) -> int | ||
{ | ||
i < L ? { print(hw[i]); __print(hw, i + 1) } : 0 | ||
} | ||
__print(hw, 0) | ||
func main() -> int { | ||
prints("Hello, World!\n"); | ||
0 | ||
} | ||
|
||
func main() -> int | ||
{ | ||
let hw = [ 72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33 ] -> int; | ||
|
||
print_str(hw) | ||
} | ||
|
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 |
---|---|---|
@@ -1,30 +1,12 @@ | ||
|
||
func print_str(hw[L] -> int) -> int | ||
{ | ||
func __print(hw[L] -> int, i -> int) -> int | ||
{ | ||
i < L ? { print(hw[i]); __print(hw, i + 1) } : 0 | ||
} | ||
__print(hw, 0) | ||
} | ||
|
||
func reverse(hw[L] -> int) -> [_] -> int | ||
func reverse(s: string) -> string | ||
{ | ||
let rev = {[ L ]} -> int; | ||
|
||
func __reverse(hw[L1] -> int, rev[L2] -> int, i -> int) -> int | ||
{ | ||
i < L1 ? { rev[L2 - i - 1] = hw[i]; __reverse(hw, rev, i + 1) } : 0 | ||
} | ||
__reverse(hw, rev, 0); | ||
|
||
rev | ||
let n = length(s); | ||
(n > 0) ? s[n - 1 .. 0] : "" | ||
} | ||
|
||
func main() -> int | ||
func main(argv[argc]: string) -> int | ||
{ | ||
let hw = [ 72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33 ] -> int; | ||
|
||
print_str(reverse(hw)) | ||
let s = (argc > 1) ? argv[1] : ""; | ||
prints(reverse(s) + "\n"); | ||
0 | ||
} | ||
|
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,8 @@ | ||
folder: | ||
extension: ".nev" | ||
naming: "hyphen" | ||
|
||
container: | ||
image: "rzuckerm/never" | ||
tag: "2.1.8a1-2" | ||
cmd: "never -f {{ source.name }}{{ source.extension }} -- --args" |
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,9 @@ | ||
folder: | ||
extension: ".pony" | ||
naming: "hyphen" | ||
|
||
container: | ||
image: "ponylang/ponyc" | ||
tag: "0.55.1-alpine" | ||
build: "ponyc . --bin-name {{ source.name }}" | ||
cmd: "./{{ source.name }}" |
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,8 @@ | ||
folder: | ||
extension: ".ring" | ||
naming: "pascal" | ||
|
||
container: | ||
image: "esolang/ring" | ||
tag: "latest" | ||
cmd: "ring {{ source.name }}{{ source.extension }}" |
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,8 @@ | ||
folder: | ||
extension: ".sy" | ||
naming: "hyphen" | ||
|
||
container: | ||
image: "thalesmg/spry" | ||
tag: "20180326" | ||
cmd: "spry {{ source.name }}{{ source.extension }}" |