diff options
Diffstat (limited to 'hello/hello')
-rw-r--r-- | hello/hello/.gitignore | 5 | ||||
-rw-r--r-- | hello/hello/buildfile | 5 | ||||
-rw-r--r-- | hello/hello/hello.cxx | 16 | ||||
-rw-r--r-- | hello/hello/testscript | 9 |
4 files changed, 35 insertions, 0 deletions
diff --git a/hello/hello/.gitignore b/hello/hello/.gitignore new file mode 100644 index 0000000..c1648ba --- /dev/null +++ b/hello/hello/.gitignore @@ -0,0 +1,5 @@ +hello + +# Testscript output directory (can be symlink). +# +test-hello diff --git a/hello/hello/buildfile b/hello/hello/buildfile new file mode 100644 index 0000000..4a510b0 --- /dev/null +++ b/hello/hello/buildfile @@ -0,0 +1,5 @@ +import libs = libhello%lib{hello} + +exe{hello}: {hxx ixx txx cxx}{*} $libs test{testscript} + +cxx.poptions =+ "-I$out_root" "-I$src_root" diff --git a/hello/hello/hello.cxx b/hello/hello/hello.cxx new file mode 100644 index 0000000..0c63c7b --- /dev/null +++ b/hello/hello/hello.cxx @@ -0,0 +1,16 @@ +#include <iostream> + +#include <libhello/hello.hxx> + +using namespace std; + +int main (int argc, char* argv[]) +{ + if (argc < 2) + { + cerr << "error: missing name" << endl; + return 1; + } + + hello::say_hello (cout, argv[1]); +} diff --git a/hello/hello/testscript b/hello/hello/testscript new file mode 100644 index 0000000..cefda39 --- /dev/null +++ b/hello/hello/testscript @@ -0,0 +1,9 @@ +: basics +: +$* 'World' >'Hello, World!' + +: missing-name +: +$* 2>>EOE != 0 +error: missing name +EOE |