commit b79644529908fe05723f86b31bcb123105cd7ae5
parent aba93ab3e9d90ccb90022bfdc25e31d7f0281959
Author: kyle <kyle@getaddrinfo.net>
Date: Mon, 26 Oct 2015 22:20:05 -0600
tests: add hello_world
Diffstat:
3 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/tests/hello_world/instrumented.c b/tests/hello_world/instrumented.c
@@ -0,0 +1,9 @@
+static unsigned int lines[77];
+#include <stdio.h>
+
+int
+main(void)
+{
+ printf("hello, world\n");
+ return lines[7] = 1, 0;
+}
diff --git a/tests/hello_world/prog.c b/tests/hello_world/prog.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int
+main(void)
+{
+ printf("hello, world\n");
+ return 0;
+}
diff --git a/tests/hello_world/test.sh b/tests/hello_world/test.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+result="`${1}`"
+expected="hello, world"
+if [ "$result" != "$expected" ]; then
+ echo "${0}: '$result' != '$expected'"
+ exit 1
+fi