diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-09 14:37:13 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-09 14:37:13 -0400 |
| commit | dad567bfc85c0f8c767e0f1cf818493f8143d871 (patch) | |
| tree | ac50287051d282b60f479d2bee7a9d163e6b5f39 | |
| parent | 900b456a267afc469fb9d79020a6c511e0318959 (diff) | |
Restore path interpolation
| -rw-r--r-- | environment.c | 1 | ||||
| -rw-r--r-- | test/paths.tm | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/environment.c b/environment.c index b17d12a0..c65edac1 100644 --- a/environment.c +++ b/environment.c @@ -253,6 +253,7 @@ env_t *new_compilation_unit(CORD *libname) {"base_name", "Path$base_name", "func(path:Path)->Text"}, {"children", "Path$children", "func(path:Path, include_hidden=no)->[Path]"}, {"create_directory", "Path$create_directory", "func(path:Path, permissions=0o644_i32)"}, + {"escape_text", "Path$escape_text", "func(text:Text)->Path"}, {"exists", "Path$exists", "func(path:Path)->Bool"}, {"extension", "Path$extension", "func(path:Path, full=yes)->Text"}, {"files", "Path$children", "func(path:Path, include_hidden=no)->[Path]"}, diff --git a/test/paths.tm b/test/paths.tm index 84321bab..602a6e6a 100644 --- a/test/paths.tm +++ b/test/paths.tm @@ -5,6 +5,10 @@ func main(): >> (~/):exists() = yes + >> filename := "example.txt" + >> (~/$filename) + = (~/example.txt) + >> tmpdir := (/tmp/tomo-test-path-XXXXXX):unique_directory() >> (/tmp):subdirectories():has(tmpdir) = yes |
