Kaydet (Commit) 8b68c5a2 authored tarafından Colomban Wendling's avatar Colomban Wendling

Add a test for the processing order when generating a tags file

üst 939dab08
...@@ -319,3 +319,13 @@ TAGS_LOG_COMPILER = $(srcdir)/runner.sh ...@@ -319,3 +319,13 @@ TAGS_LOG_COMPILER = $(srcdir)/runner.sh
TESTS = $(test_results) TESTS = $(test_results)
EXTRA_DIST = $(test_sources) $(test_results) EXTRA_DIST = $(test_sources) $(test_results)
# check processing order of files on the command line
check_processing_order_sources = \
process_order.c.tags process_order_1.h process_order_2.h
EXTRA_DIST += $(check_processing_order_sources)
.PHONY: check-processing-order
check-processing-order: $(check_processing_order_sources)
srcdir="$(srcdir)" top_builddir="$(top_builddir)" \
$(srcdir)/runner.sh --result $(check_processing_order_sources:%=$(srcdir)/%)
check-local: check-processing-order
# format=tagmanager
I1_E14anon_enum_00
I1_E24anon_enum_00
I2_E14anon_enum_10
I2_E24anon_enum_10
anon_enum_020
anon_enum_120
...@@ -17,9 +17,21 @@ mkdir -p "$CONFDIR/filedefs/" || exit 99 ...@@ -17,9 +17,21 @@ mkdir -p "$CONFDIR/filedefs/" || exit 99
cp "${srcdir:-.}"/../../data/filetype_extensions.conf "$CONFDIR" || exit 99 cp "${srcdir:-.}"/../../data/filetype_extensions.conf "$CONFDIR" || exit 99
cp "${srcdir:-.}"/../../data/filedefs/filetypes.* "$CONFDIR/filedefs/" || exit 99 cp "${srcdir:-.}"/../../data/filedefs/filetypes.* "$CONFDIR/filedefs/" || exit 99
result="$1" if [ "$1" = "--result" ]; then
source="${result%.*}" # --result $result $source...
[ $# -gt 2 ] || exit 99
shift
result="$1"
shift
source="$1"
else
# result is $1 and source is inferred from result
result="$1"
source="${result%.*}"
fi
shift
tagfile="$TMPDIR/test.${source##*.}.tags" tagfile="$TMPDIR/test.${source##*.}.tags"
"$GEANY" -c "$CONFDIR" -P -g "$tagfile" "$source" || exit 1 "$GEANY" -c "$CONFDIR" -P -g "$tagfile" "$source" "$@" || exit 1
diff -u "$result" "$tagfile" || exit 2 diff -u "$result" "$tagfile" || exit 2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment