Revision 127
Added by Aaron Marcuse-Kubitza almost 13 years ago
map | ||
---|---|---|
21 | 21 |
|
22 | 22 |
function exportXml() |
23 | 23 |
{ |
24 |
out="$stem.$in_type.$out_fmt.xml"
|
|
24 |
out="$stem.$out_fmt.xml" |
|
25 | 25 |
(set -x; ../map "../../mappings/$src-$out_fmt.$table.csv" >"output/$out"\ |
26 | 26 |
&& diff "accepted_output/$out" "output/$out") |
27 | 27 |
} |
... | ... | |
36 | 36 |
stem="$(basename -- "${in%.*}")" # remove extension and dir |
37 | 37 |
src="${stem%.*}" # before last "." |
38 | 38 |
table="${stem##*.}" # after last "." |
39 |
if test "_$ext" == "_csv"; then in_type=CSV |
|
40 |
elif test "_$ext" == "_sh"; then in_type=DB |
|
41 |
fi |
|
42 | 39 |
|
43 | 40 |
# Test exporting to XML |
44 | 41 |
for out_fmt in VegX VegBank; do |
45 |
if test "_$ext" == "_csv"; then importCsv|exportXml
|
|
46 |
elif test "_$ext" == "_sh"; then (. "$in"; exportXml)
|
|
42 |
if test "$ext" == "csv"; then importCsv|exportXml
|
|
43 |
elif test "$ext" == "sh"; then (. "$in"; exportXml)
|
|
47 | 44 |
fi |
48 | 45 |
done |
49 | 46 |
|
50 | 47 |
# Test exporting to VegBank db |
51 |
if test "_$ext" == "_csv"; then importCsv|exportDb
|
|
52 |
elif test "_$ext" == "_sh"; then (. "$in"; exportDb)
|
|
48 |
if test "$ext" == "csv"; then importCsv|exportDb
|
|
49 |
elif test "$ext" == "sh"; then (. "$in"; exportDb)
|
|
53 | 50 |
fi |
54 | 51 |
done |
Also available in: Unified diff
Renamed test/map output to remove CSV/DB indicator because that is now specified in the datasource name