aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/printf/output.txt2
-rw-r--r--tests/printf/test.c2
-rw-r--r--tests/runner.py2
3 files changed, 5 insertions, 1 deletions
diff --git a/tests/printf/output.txt b/tests/printf/output.txt
index 412c6b0f..01822327 100644
--- a/tests/printf/output.txt
+++ b/tests/printf/output.txt
@@ -9,6 +9,8 @@ Some different radixes: 100 64 144 0x64 0144
floats: 3.14 +3e+00 3.141600E+00
Width trick: 10
A string %
+Null string: (null)
+Null pointer: (nil)
inf
INF
-inf
diff --git a/tests/printf/test.c b/tests/printf/test.c
index d12e0d2e..efd9d087 100644
--- a/tests/printf/test.c
+++ b/tests/printf/test.c
@@ -14,6 +14,8 @@ int main() {
printf("floats: %4.2f %+.0e %E\n", 3.1416, 3.1416, 3.1416);
printf("Width trick: %*d\n", 5, 10);
printf("%s %%\n", "A string");
+ printf("Null string: %7s\n", NULL);
+ printf("Null pointer: %p\n", NULL);
printf("%lf\n", INFINITY);
printf("%lF\n", INFINITY);
printf("%lf\n", -INFINITY);
diff --git a/tests/runner.py b/tests/runner.py
index d75d7e35..6edf9c20 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -716,7 +716,7 @@ if 'benchmark' not in sys.argv:
return 0;
}
'''
- self.do_test(src, '*0x0*')
+ self.do_test(src, '*(nil)*')
def test_funcs(self):
src = '''