String interpolation

This commit is contained in:
2021-01-24 18:23:32 -07:00
parent bce35bc6c0
commit c35be6a23b
4 changed files with 81 additions and 9 deletions

View File

@@ -277,6 +277,10 @@ class BasicTestCase extends Test {
function testRawString() {
_testRawString();
}
function testKissStrings() {
_testKissStrings();
}
}
class BasicObject {

View File

@@ -458,4 +458,12 @@
(defun _testRawString []
(Assert.equals #| "\\" |# #"\"#)
(Assert.equals #| "\"#" |# ##""#"##))
(Assert.equals #| "\"#" |# ##""#"##))
(defun _testKissStrings []
(Assert.equals #| "\\\t\r\n\"$" |# "\\\t\r\n\"\$")
(let [str "it's"
num 3
l1 ["a" "b" "c"]
l2 [1 2 3]]
(Assert.equals "it's 3asy as [a,b,c] [1,2,3]" "$str ${num}asy as $l1 $l2")))