| 1 |
-- metadata.yaml -- |
| 2 |
#files: "files/" # these are some extra files we can use (is the default) |
| 3 |
-- main.mcl -- |
| 4 |
import "golang/strings" |
| 5 |
import "deploy" |
| 6 |
|
| 7 |
$f1 = "/files/file1" |
| 8 |
|
| 9 |
# the abspath method shouldn't be used often, it's here for testing... |
| 10 |
if $f1 != deploy.abspath($f1) { # should be the same, since we're in the same dir |
| 11 |
test "f1 error" {} |
| 12 |
} |
| 13 |
|
| 14 |
# the readfileabs method shouldn't be used often, it's here for testing... |
| 15 |
$x1 = deploy.readfileabs($f1) |
| 16 |
|
| 17 |
if $x1 != deploy.readfile($f1) { |
| 18 |
test "x1 error" {} |
| 19 |
} |
| 20 |
|
| 21 |
# hide the newlines from our output |
| 22 |
test [strings.trim_space($x1),] {} |
| 23 |
-- files/file1 -- |
| 24 |
This is file1 in the files/ folder. |
| 25 |
-- OUTPUT -- |
| 26 |
Vertex: test[This is file1 in the files/ folder.] |