Skip to content

Commit f99dd79

Browse files
committed
versionCompare
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent d747f15 commit f99dd79

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: tools/src/test/proto/test.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ function schema-breaking-version () {
5050
local NEW="bom-${1}.proto"
5151
local OLD="bom-${2}.proto"
5252

53-
local NEW_NP="$(mktemp)"
54-
local OLD_NP="$(mktemp)"
53+
local NEW_NP OLD_NP
54+
NEW_NP="$(mktemp)"
55+
OLD_NP="$(mktemp)"
5556

5657
# remove package identifier -> so that the comparisson works as expected
5758
sed 's/^package .*//' "${ROOT_PATH}/${SCHEMA_DIR}/${NEW}" > "$NEW_NP"
@@ -116,10 +117,11 @@ function schema-functional () {
116117
--to /dev/null
117118
}
118119

120+
local SCHEMA_VERS
119121
shopt -s globstar
120122
for test_res in "$ROOT_PATH"/"$TEST_RES_DIR"/*/valid-*.textproto
121123
do
122-
local SCHEMA_VERS="$(basename "$(dirname "$test_res")")"
124+
SCHEMA_VERS="$(basename "$(dirname "$test_res")")"
123125
validate "$test_res" "$SCHEMA_VERS"
124126
done
125127

0 commit comments

Comments
 (0)