Import LinuxCNC source tree
This commit is contained in:
1
tests/halcompile/names/.gitignore
vendored
Normal file
1
tests/halcompile/names/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
names_match.c
|
||||
0
tests/halcompile/names/expected
Normal file
0
tests/halcompile/names/expected
Normal file
6
tests/halcompile/names/names_dont_match.comp
Normal file
6
tests/halcompile/names/names_dont_match.comp
Normal file
@@ -0,0 +1,6 @@
|
||||
component wrong_name;
|
||||
license "GPL";
|
||||
pin out bit out;
|
||||
function _;
|
||||
;;
|
||||
FUNCTION(_) {}
|
||||
6
tests/halcompile/names/names_match.comp
Normal file
6
tests/halcompile/names/names_match.comp
Normal file
@@ -0,0 +1,6 @@
|
||||
component names_match;
|
||||
license "GPL";
|
||||
pin out bit out;
|
||||
function _;
|
||||
;;
|
||||
FUNCTION(_) {}
|
||||
25
tests/halcompile/names/test.sh
Executable file
25
tests/halcompile/names/test.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
|
||||
# this one must succeed
|
||||
rm -f names_match.c
|
||||
if ! halcompile names_match.comp; then
|
||||
echo 'halcompile failed to process names_match.comp'
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f names_match.c ]; then
|
||||
echo 'halcompile failed to produce names_match.c'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# this one must fail
|
||||
rm -f names_dont_match.c
|
||||
if halcompile names_dont_match.comp; then
|
||||
echo 'halcompile erroneously accepted names_dont_match.comp'
|
||||
exit 1
|
||||
fi
|
||||
if [ -f names_dont_match.c ]; then
|
||||
echo 'halcompile erroneously produced names_dont_match.c'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user