enhanced the compiler to prohibit variable declaration in class init scope
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-11-27 18:25:27 +09:00
parent eede341cfa
commit f3c0c1b8c1
6 changed files with 48 additions and 54 deletions

View File

@ -3,7 +3,7 @@
for i in $@; do :; done
script="$i"
expected_errinfo=$(grep -E "##[[:space:]]+ERROR:" "$script" 2>/dev/null)
expected_errinfo=$(grep -n -o -E "##ERROR: .+" "$script" 2>/dev/null)
[ -z "$expected_errinfo" ] && {
echo "INVALID TESTER - $script contains no ERROR information"
exit 1
@ -11,11 +11,13 @@ expected_errinfo=$(grep -E "##[[:space:]]+ERROR:" "$script" 2>/dev/null)
expected_errline=$(echo $expected_errinfo | cut -d: -f1)
xlen=$(echo $expected_errline | wc -c)
xlen=$(expr $xlen + 2)
xlen=$(expr $xlen + 10)
expected_errmsg=$(echo $expected_errinfo | cut -c${xlen}-)
output=$($@ 2>&1)
echo "$output" | grep -E "ERROR:.+${script}.+${expected_errmsg}" || {
## the regular expression is not escaped properly. the error information must not
## include specifial regex characters to avoid problems.
echo "$output" | grep -E "ERROR:.+${script}\[${expected_errline},[[:digit:]]+\] ${expected_errmsg}" || {
echo "$script - $output"
exit 1
}