From 0064599a27ec44880e4ff6fa19f453e610b5ef07 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 1 May 2006 14:01:47 +0000 Subject: * String interpolation. Expressions like "--with-freetype2-library=" + freetype + "/lib" can now be written as "--with-freetype2-library=${freetype}/lib" An arbitrary expression can be enclosed within ${...}, not just identifiers. * Escaping in string literals: \n, \r, \t interpreted as in C, any other character following \ is interpreted as-is. * Newlines are now allowed in string literals. --- tests/lang/eval-okay-string.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/lang/eval-okay-string.nix') diff --git a/tests/lang/eval-okay-string.nix b/tests/lang/eval-okay-string.nix index b5280a0cd1fa..f2452e85745b 100644 --- a/tests/lang/eval-okay-string.nix +++ b/tests/lang/eval-okay-string.nix @@ -1 +1,9 @@ -"foo" + "bar" + toString (/a/b + /c/d) + (/foo/bar + "/../xyzzy/." + "/foo.txt") + ("/../foo" + /x/y) +"foo" + "bar" + + toString (/a/b + /c/d) + + (/foo/bar + "/../xyzzy/." + "/foo.txt") + + ("/../foo" + /x/y) + + "escape: \"quote\" \n \\" + + "end +of +line" + + "foo${if true then "b${"a" + "r"}" else "xyzzy"}blaat" -- cgit 1.4.1