From 3f77df42eeaee1901fb721686fa6c6b89c248385 Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Fri, 20 Sep 2024 08:16:06 +0800 Subject: [PATCH] Initial test script snippet files. --- test/digits.zhv | 13 +++++++++++++ test/func.zhv | 9 +++++++++ 2 files changed, 22 insertions(+) create mode 100644 test/digits.zhv create mode 100644 test/func.zhv diff --git a/test/digits.zhv b/test/digits.zhv new file mode 100644 index 0000000..9c48350 --- /dev/null +++ b/test/digits.zhv @@ -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"; diff --git a/test/func.zhv b/test/func.zhv new file mode 100644 index 0000000..c885584 --- /dev/null +++ b/test/func.zhv @@ -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";