Skip to content

Commit

Permalink
Initial test script snippet files.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Sep 20, 2024
1 parent 9d805cd commit 3f77df4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/digits.zhv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/zhivo

val bin = 0b001000;
val tri = 0t22;
val oct = 0c10;
val dec = 8.0;
val hex = 0x08;

render "Binary: " + bin + "\r\n";
render "Trinary: " + tri + "\r\n";
render "Octaldecimal: " + oct + "\r\n";
render "Decimal: " + dec + "\r\n";
render "Hexadecimal: " + hex + "\r\n";
9 changes: 9 additions & 0 deletions test/func.zhv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/zhivo

val add = func(x, y) {
ret x + y;
};

render add(1, 2) + "\r\n";
render add("This is regex: ", `[]`) + "\r\n";
render add("Hello ", "world!") + "\r\n";

0 comments on commit 3f77df4

Please sign in to comment.