diff options
Diffstat (limited to 'debian/tests')
-rw-r--r-- | debian/tests/control | 2 | ||||
-rwxr-xr-x | debian/tests/klcc | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..0be8559 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Tests: klcc +Depends: build-essential, libklibc-dev diff --git a/debian/tests/klcc b/debian/tests/klcc new file mode 100755 index 0000000..4dc76b4 --- /dev/null +++ b/debian/tests/klcc @@ -0,0 +1,13 @@ +#!/bin/sh -e + +cat >"$AUTOPKGTEST_TMP/hello.c" <<EOF +#include <stdio.h> +int main(void) +{ + printf("Hello world\n"); +} +EOF + +klcc "$AUTOPKGTEST_TMP/hello.c" -o "$AUTOPKGTEST_TMP/hello" +"$AUTOPKGTEST_TMP/hello" >"$AUTOPKGTEST_TMP/hello.out" +grep -F 'Hello world' "$AUTOPKGTEST_TMP/hello.out" |