if bash.found()
test_env = environment()
- foreach t : ['simplify', 'settings']
+ foreach t : ['simplify', 'simplify-3to4', 'settings']
if get_option('install-tests')
configure_file(output: t,
input: '@0@.in'.format(t),
endforeach
install_subdir('simplify-data', install_dir: testexecdir)
+ install_subdir('simplify-data-3to4', install_dir: testexecdir)
endif
--- /dev/null
+#! /bin/bash
+
+GTK_BUILDER_TOOL=${GTK_BUILDER_TOOL:-gtk-builder-tool}
+TEST_DATA_DIR=${TEST_DATA_DIR:-./simplify-data-3to4}
+TEST_RESULT_DIR=${TEST_RESULT_DIR:-/tmp}
+
+shopt -s nullglob
+TESTS=( "$TEST_DATA_DIR"/*.ui )
+
+echo "1..${#TESTS[*]}"
+
+I=1
+for t in ${TESTS[*]}; do
+ name=$(basename $t .ui)
+ expected="$TEST_DATA_DIR/$name.expected"
+ result="$TEST_RESULT_DIR/$name.out"
+ diff="$TEST_RESULT_DIR/$name.diff"
+ ref="$TEST_RESULT_DIR/$name.ref"
+
+ $GTK_BUILDER_TOOL simplify --3to4 $t 2>/dev/null >$result
+
+ if diff -u "$expected" "$result" > "$diff"; then
+ echo "ok $I $name"
+ rm "$diff"
+ else
+ echo "not ok $I $name"
+ cp "$expected" "$ref"
+ fi
+
+ I=$((I+1))
+done