]> granicus.if.org Git - clang/commitdiff
Add simple test case to make sure driver can generate executables.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 18 Mar 2009 22:49:41 +0000 (22:49 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 18 Mar 2009 22:49:41 +0000 (22:49 +0000)
 - Hopefully Chris can pardon one executable test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67251 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/hello.c [new file with mode: 0644]

diff --git a/test/Driver/hello.c b/test/Driver/hello.c
new file mode 100644 (file)
index 0000000..8844ede
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: clang-driver -ccc-echo -o %t %s &> %t.log &&
+
+// Make sure we used clang.
+// RUN: grep 'clang" .*hello.c' %t.log &&
+
+// RUN: %t > %t.out &&
+// RUN: grep "I'm a little driver, short and stout." %t.out
+
+#include <stdio.h>
+
+int main() {
+  printf("I'm a little driver, short and stout.");
+  return 0;
+}