aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2014-01-18 14:31:20 +0700
committerBruce Mitchener <bruce.mitchener@gmail.com>2014-01-18 14:31:20 +0700
commit8762f317490f82ddadf8257d29f8dc2b074b2683 (patch)
treee716bdf760eacfa4ee89aa279931879c17270fad /tests
parentab0a6e5a6fc4a5d25d19bdfaf818fc4151e95148 (diff)
Implement catopen/catgets/catclose to help libcxx tests pass.
Diffstat (limited to 'tests')
-rw-r--r--tests/core/test_nl_types.in8
-rw-r--r--tests/core/test_nl_types.out1
-rw-r--r--tests/test_core.py6
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/core/test_nl_types.in b/tests/core/test_nl_types.in
new file mode 100644
index 00000000..666920ee
--- /dev/null
+++ b/tests/core/test_nl_types.in
@@ -0,0 +1,8 @@
+#include <nl_types.h>
+#include <stdio.h>
+
+int main(int argc, char ** argv) {
+ nl_catd c = catopen("none", 0);
+ printf("Hello, %s.\n", catgets(c, 0, 0, "world"));
+ return catclose(c);
+}
diff --git a/tests/core/test_nl_types.out b/tests/core/test_nl_types.out
new file mode 100644
index 00000000..f75ba05f
--- /dev/null
+++ b/tests/core/test_nl_types.out
@@ -0,0 +1 @@
+Hello, world.
diff --git a/tests/test_core.py b/tests/test_core.py
index 841800df..b1e1ffe6 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -4294,6 +4294,12 @@ def process(filename):
self.do_run_from_file(src, output)
+ def test_nl_types(self):
+ test_path = path_from_root('tests', 'core', 'test_nl_types')
+ src, output = (test_path + s for s in ('.in', '.out'))
+
+ self.do_run_from_file(src, output)
+
def test_799(self):
src = open(path_from_root('tests', '799.cpp'), 'r').read()
self.do_run(src, '''Set PORT family: 0, port: 3979