From 91a1ca266f80927f8f06db0fc11e60c93dce7ca9 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 8 Jul 2023 12:49:28 +0100 Subject: Add example for string addition --- examples/string-add/shed.toml | 9 +++++++++ examples/string-add/src/HelloWorld.shed | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 examples/string-add/shed.toml create mode 100644 examples/string-add/src/HelloWorld.shed (limited to 'examples/string-add') diff --git a/examples/string-add/shed.toml b/examples/string-add/shed.toml new file mode 100644 index 00000000..156fa7c6 --- /dev/null +++ b/examples/string-add/shed.toml @@ -0,0 +1,9 @@ +[shed] +main = "HelloWorld" + +[[shed.bins]] +name = "hello-world" + +[[shed.examples]] +bin = "hello-world" +expected-output = "hello, world" diff --git a/examples/string-add/src/HelloWorld.shed b/examples/string-add/src/HelloWorld.shed new file mode 100644 index 00000000..07657574 --- /dev/null +++ b/examples/string-add/src/HelloWorld.shed @@ -0,0 +1,3 @@ +fun main() ! Io -> Unit { + print!("hello, " + "world\n"); +} -- cgit v1.2.3