1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-07-05 03:40:45 +03:00

b2/: insert a virtual empty hierarchy if test input starts with other file

Also updated the regression tests that explicitly provided an empty
hierarchy.
This commit is contained in:
Werner Almesberger 2012-06-02 20:42:49 -03:00
parent 3027daca18
commit d1593b6681
4 changed files with 6 additions and 14 deletions

View File

@ -13,13 +13,17 @@
run_boom() run_boom()
{ {
if [ "`sed -n '/^!-/p;q' _in`" ]; then
args="<(echo ';')"
else
args="-N h <(sed -n '/^!-/q;p' _in)" args="-N h <(sed -n '/^!-/q;p' _in)"
fi
for n in c x p i s b X; do for n in c x p i s b X; do
for m in "" 1 2 3; do for m in "" 1 2 3; do
if grep ^!-$n$m\$ _in >/dev/null; then if grep ^!-$n$m\$ _in >/dev/null; then
args="$args -N $n$m" args="$args -N $n$m"
args="$args -$n \ args="$args -$n \
<(sed -n '1,/^!-$n$m/d;/^!-/q;p' _in)" <(sed -n '0,/^!-$n$m/d;/^!-/q;p' _in)"
fi fi
done done
done done

View File

@ -4,7 +4,6 @@
############################################################################### ###############################################################################
tst "currency: one currency" <<EOF tst "currency: one currency" <<EOF
; /* no hierarchy */
!-x !-x
GBP USD 0.615219 GBP USD 0.615219
EOF EOF
@ -15,7 +14,6 @@ EOF
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
tst "currency: two currencies" <<EOF tst "currency: two currencies" <<EOF
; /* no hierarchy */
!-x !-x
EUR USD 1.3214 GBP 1.62542 EUR USD 1.3214 GBP 1.62542
GBP USD 0.615219 GBP USD 0.615219
@ -27,7 +25,6 @@ EOF
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
tst_fail "currency: duplicate currency" <<EOF tst_fail "currency: duplicate currency" <<EOF
; /* no hierarchy */
!-x !-x
GBP USD 0.615219 GBP USD 0.615219
GBP USD 0.615219 GBP USD 0.615219
@ -40,7 +37,6 @@ EOF
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
tst_fail "currency: duplicate exchange rate" <<EOF tst_fail "currency: duplicate exchange rate" <<EOF
; /* no hierarchy */
!-x !-x
EUR USD 1.3214 USD 1.3214 EUR USD 1.3214 USD 1.3214
EOF EOF

View File

@ -4,7 +4,6 @@
############################################################################### ###############################################################################
tst "inventory: one item" <<EOF tst "inventory: one item" <<EOF
; /* no hierarchy */
!-x !-x
USD USD
!-i !-i
@ -20,7 +19,6 @@ EOF
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
tst "inventory: two items" <<EOF tst "inventory: two items" <<EOF
; /* no hierarchy */
!-x !-x
USD USD
!-i !-i
@ -38,7 +36,6 @@ EOF
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
tst "inventory: two files" <<EOF tst "inventory: two files" <<EOF
; /* no hierarchy */
!-x !-x
USD USD
!-i1 !-i1
@ -57,7 +54,6 @@ EOF
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
tst_fail "inventory: duplicate item" <<EOF tst_fail "inventory: duplicate item" <<EOF
; /* no hierarchy */
!-x !-x
USD USD
!-i !-i
@ -72,7 +68,6 @@ EOF
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
tst_fail "inventory: unknown currency" <<EOF tst_fail "inventory: unknown currency" <<EOF
; /* no hierarchy */
!-i !-i
FOO R101X-T TR 1234 3000 EUR 0 3000 10.4 FOO R101X-T TR 1234 3000 EUR 0 3000 10.4
EOF EOF

View File

@ -4,7 +4,6 @@
############################################################################### ###############################################################################
tst "provider: one provider" <<EOF tst "provider: one provider" <<EOF
; /* no hierarchy */
!-p !-p
FOO USD 0 0 FOO USD 0 0
EOF EOF
@ -15,7 +14,6 @@ EOF
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
tst "provider: two providers" <<EOF tst "provider: two providers" <<EOF
; /* no hierarchy */
!-p !-p
FOO USD 0 0 FOO USD 0 0
BAR EUR 5 100 /* EUR 5 S&H, EUR 100 minimum order */ BAR EUR 5 100 /* EUR 5 S&H, EUR 100 minimum order */
@ -27,7 +25,6 @@ EOF
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
tst_fail "provider: duplicate provider" <<EOF tst_fail "provider: duplicate provider" <<EOF
; /* no hierarchy */
!-p !-p
FOO USD 0 0 FOO USD 0 0
FOO USD 0 0 FOO USD 0 0