From 0da46fa5a48dee0ac2be00886a6ed5fe429f20be Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Tue, 13 Apr 2004 01:37:57 +0000 Subject: 2004-04-12 Jon Trowbridge * bus/config-parser.c (struct BusConfigParser): Added included_files field. (seen_include): Added. Checks whether or not a file has already been included by any parent BusConfigParser. (bus_config_parser_new): Copy the parent's included_files. (include_file): Track which files have been included, and fail on circular inclusions. (process_test_valid_subdir): Changed printf to report if we are testing valid or invalid conf files. (all_are_equiv): Changed printf to be a bit clearer about what we are actually doing. (bus_config_parser_test): Test invalid configuration files. --- test/data/invalid-config-files/circular-1.conf | 4 ++++ test/data/invalid-config-files/circular-2.conf | 4 ++++ test/data/invalid-config-files/circular-3.conf | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 test/data/invalid-config-files/circular-1.conf create mode 100644 test/data/invalid-config-files/circular-2.conf create mode 100644 test/data/invalid-config-files/circular-3.conf (limited to 'test/data') diff --git a/test/data/invalid-config-files/circular-1.conf b/test/data/invalid-config-files/circular-1.conf new file mode 100644 index 00000000..faa895a3 --- /dev/null +++ b/test/data/invalid-config-files/circular-1.conf @@ -0,0 +1,4 @@ + + +circular-1.conf + \ No newline at end of file diff --git a/test/data/invalid-config-files/circular-2.conf b/test/data/invalid-config-files/circular-2.conf new file mode 100644 index 00000000..46a7e78e --- /dev/null +++ b/test/data/invalid-config-files/circular-2.conf @@ -0,0 +1,4 @@ + + +circular-3.conf + \ No newline at end of file diff --git a/test/data/invalid-config-files/circular-3.conf b/test/data/invalid-config-files/circular-3.conf new file mode 100644 index 00000000..87e354d9 --- /dev/null +++ b/test/data/invalid-config-files/circular-3.conf @@ -0,0 +1,4 @@ + + +circular-2.conf + \ No newline at end of file -- cgit v1.2.3