[geany/geany] 8b68c5: Add a test for the processing order when generating a tags file
Colomban Wendling
git-noreply at xxxxx
Mon Nov 12 10:47:25 UTC 2018
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Mon, 12 Nov 2018 10:47:25 UTC
Commit: 8b68c5a2caec368d243c5a588c12121f7b20550c
https://github.com/geany/geany/commit/8b68c5a2caec368d243c5a588c12121f7b20550c
Log Message:
-----------
Add a test for the processing order when generating a tags file
Modified Paths:
--------------
tests/ctags/Makefile.am
tests/ctags/process_order.c.tags
tests/ctags/process_order_1.h
tests/ctags/process_order_2.h
tests/ctags/runner.sh
Modified: tests/ctags/Makefile.am
10 lines changed, 10 insertions(+), 0 deletions(-)
===================================================================
@@ -319,3 +319,13 @@ TAGS_LOG_COMPILER = $(srcdir)/runner.sh
TESTS = $(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
Modified: tests/ctags/process_order.c.tags
7 lines changed, 7 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,7 @@
+# format=tagmanager
+I1_E1�4�anon_enum_0�0
+I1_E2�4�anon_enum_0�0
+I2_E1�4�anon_enum_1�0
+I2_E2�4�anon_enum_1�0
+anon_enum_0�2�0
+anon_enum_1�2�0
Modified: tests/ctags/process_order_1.h
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,4 @@
+enum {
+ I1_E1,
+ I1_E2,
+};
Modified: tests/ctags/process_order_2.h
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,4 @@
+enum {
+ I2_E1,
+ I2_E2,
+};
Modified: tests/ctags/runner.sh
18 lines changed, 15 insertions(+), 3 deletions(-)
===================================================================
@@ -17,9 +17,21 @@ mkdir -p "$CONFDIR/filedefs/" || exit 99
cp "${srcdir:-.}"/../../data/filetype_extensions.conf "$CONFDIR" || exit 99
cp "${srcdir:-.}"/../../data/filedefs/filetypes.* "$CONFDIR/filedefs/" || exit 99
-result="$1"
-source="${result%.*}"
+if [ "$1" = "--result" ]; then
+ # --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"
-"$GEANY" -c "$CONFDIR" -P -g "$tagfile" "$source" || exit 1
+"$GEANY" -c "$CONFDIR" -P -g "$tagfile" "$source" "$@" || exit 1
diff -u "$result" "$tagfile" || exit 2
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list