*** empty log message ***
This commit is contained in:
parent
1ba1a0bcd3
commit
f3b9755c3c
@ -1,12 +1,45 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
run_script_for_init()
|
||||||
|
{
|
||||||
|
script="$1"
|
||||||
|
data="$2"
|
||||||
|
output=`echo $script | sed 's/\.awk$/.out/g'`
|
||||||
|
|
||||||
|
./awk "$script" "$data" > "$output"
|
||||||
|
}
|
||||||
|
|
||||||
run_init()
|
run_init()
|
||||||
{
|
{
|
||||||
for script in emp-???.awk
|
for script in emp-???.awk
|
||||||
do
|
do
|
||||||
output=`echo $script | sed 's/\.awk$/.out/g'`
|
run_script_for_init "$script" "emp-en.data"
|
||||||
./awk $script emp-en.data > "$output"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for script in cou-???.awk
|
||||||
|
do
|
||||||
|
run_script_for_init "$script" "cou-en.data"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
run_script_for_test()
|
||||||
|
{
|
||||||
|
script="$1"
|
||||||
|
data="$2"
|
||||||
|
output=`echo $script | sed 's/\.awk$/.out/g'`
|
||||||
|
|
||||||
|
./awk "$script" "$data" > "$output.$pid"
|
||||||
|
|
||||||
|
#diff -y "$output" "$output.$pid"
|
||||||
|
diff "$output" "$output.$pid"
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
rm -f "$output.$pid"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f "$output.$pid"
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
run_test()
|
run_test()
|
||||||
@ -15,21 +48,26 @@ run_test()
|
|||||||
|
|
||||||
for script in emp-???.awk
|
for script in emp-???.awk
|
||||||
do
|
do
|
||||||
output=`echo $script | sed 's/\.awk$/.out/g'`
|
run_script_for_test "$script" "emp-en.data"
|
||||||
./awk $script emp-en.data > "$output.$pid"
|
|
||||||
|
|
||||||
#diff -y $output "$output.$pid"
|
|
||||||
diff $output "$output.$pid"
|
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "###################################"
|
echo "###################################"
|
||||||
echo "PROBLEM(S) DETECTED IN $script.".
|
echo "PROBLEM(S) DETECTED IN $script.".
|
||||||
echo "###################################"
|
echo "###################################"
|
||||||
rm -f "$output.$pid"
|
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
rm -f "$output.$pid"
|
for script in cou-???.awk
|
||||||
|
do
|
||||||
|
run_script_for_test "$script" "cou-en.data"
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "###################################"
|
||||||
|
echo "PROBLEM(S) DETECTED IN $script.".
|
||||||
|
echo "###################################"
|
||||||
|
break
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user