summaryrefslogtreecommitdiff
path: root/tests/test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-05 12:47:06 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-05 12:47:06 +0300
commit0f08dcfc229402dcafeffc45c01d9713e62cb9c5 (patch)
treeccf15b3448699f30499ecdf92dbd5d51f88d8640 /tests/test
parent823f53f89963bde6e6d57e58348f8242fda2cdd9 (diff)
Add tests
Diffstat (limited to 'tests/test')
-rw-r--r--tests/test/buildfile4
-rw-r--r--tests/test/driver.cxx13
-rw-r--r--tests/test/test.out1
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/test/buildfile b/tests/test/buildfile
new file mode 100644
index 0000000..92d2804
--- /dev/null
+++ b/tests/test/buildfile
@@ -0,0 +1,4 @@
+import libs = libformat%lib{format}
+
+exe{driver}: cxx{driver} $libs
+exe{driver}: test.output = test.out
diff --git a/tests/test/driver.cxx b/tests/test/driver.cxx
new file mode 100644
index 0000000..fb2939d
--- /dev/null
+++ b/tests/test/driver.cxx
@@ -0,0 +1,13 @@
+// file: tests/test/driver.cxx -*- C++ -*-
+
+#include <iostream>
+
+#include <libformat/format.hxx>
+
+int
+main ()
+{
+ using namespace std;
+
+ cout << format ("Hello", "World") << endl;
+}
diff --git a/tests/test/test.out b/tests/test/test.out
new file mode 100644
index 0000000..8ab686e
--- /dev/null
+++ b/tests/test/test.out
@@ -0,0 +1 @@
+Hello, World!