diff options
| author | Michael Biebl <biebl@debian.org> | 2016-10-01 00:33:49 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-10-01 00:33:49 +0200 |
| commit | 270c4830551c9810ad4e83f9a1db2b1cb946208c (patch) | |
| tree | 5df09188f7e43b70896efb7b6e942e0b130d75d3 /src/settings/plugins/ifupdown/tests | |
| parent | 7514efc2f38c9ace4557d4e69d68e7d380389030 (diff) | |
New upstream version 1.4.2 upstream/1.4.2
Diffstat (limited to 'src/settings/plugins/ifupdown/tests')
5 files changed, 31 insertions, 3 deletions
diff --git a/src/settings/plugins/ifupdown/tests/Makefile.am b/src/settings/plugins/ifupdown/tests/Makefile.am index 1287a716..3d702375 100644 --- a/src/settings/plugins/ifupdown/tests/Makefile.am +++ b/src/settings/plugins/ifupdown/tests/Makefile.am @@ -35,4 +35,5 @@ EXTRA_DIST = \ test1 test2 test3 test4 test5 test6 test7 test8 test9 test11 test12 \ test13 test14 test15 test16 test17-wired-static-verify-ip4 \ test18-wired-static-verify-ip6 test19-wired-static-verify-ip4-plen \ - test20-source-stanza test20-source-stanza.eth0 test20-source-stanza.eth1 + test20-source-stanza test20-source-stanza.eth0 test20-source-stanza.eth1 \ + test21-source-dir-stanza test21-source-dir-stanza.d diff --git a/src/settings/plugins/ifupdown/tests/Makefile.in b/src/settings/plugins/ifupdown/tests/Makefile.in index b63f9a89..b3be79e1 100644 --- a/src/settings/plugins/ifupdown/tests/Makefile.in +++ b/src/settings/plugins/ifupdown/tests/Makefile.in @@ -95,7 +95,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \ $(top_srcdir)/m4/ax_lib_readline.m4 \ $(top_srcdir)/m4/compiler_options.m4 \ - $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/git-sha-record.m4 \ $(top_srcdir)/m4/gnome-code-coverage.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intltool.m4 \ @@ -688,7 +688,8 @@ EXTRA_DIST = \ test1 test2 test3 test4 test5 test6 test7 test8 test9 test11 test12 \ test13 test14 test15 test16 test17-wired-static-verify-ip4 \ test18-wired-static-verify-ip6 test19-wired-static-verify-ip4-plen \ - test20-source-stanza test20-source-stanza.eth0 test20-source-stanza.eth1 + test20-source-stanza test20-source-stanza.eth0 test20-source-stanza.eth1 \ + test21-source-dir-stanza test21-source-dir-stanza.d all: all-am diff --git a/src/settings/plugins/ifupdown/tests/test-ifupdown.c b/src/settings/plugins/ifupdown/tests/test-ifupdown.c index 7ce08aee..11b42c71 100644 --- a/src/settings/plugins/ifupdown/tests/test-ifupdown.c +++ b/src/settings/plugins/ifupdown/tests/test-ifupdown.c @@ -627,6 +627,27 @@ test20_source_stanza (const char *path) expected_free (e); } +static void +test21_source_dir_stanza (const char *path) +{ + Expected *e; + ExpectedBlock *b; + + e = expected_new (); + + b = expected_block_new ("auto", "eth0"); + expected_add_block (e, b); + b = expected_block_new ("iface", "eth0"); + expected_add_block (e, b); + expected_block_add_key (b, expected_key_new ("inet", "dhcp")); + + init_ifparser_with_file (path, "test21-source-dir-stanza"); + compare_expected_to_ifparser (e); + + ifparser_destroy (); + expected_free (e); +} + NMTST_DEFINE (); int @@ -675,6 +696,8 @@ main (int argc, char **argv) (GTestDataFunc) test19_read_static_ipv4_plen); g_test_add_data_func ("/ifupdate/source_stanza", TEST_ENI_DIR, (GTestDataFunc) test20_source_stanza); + g_test_add_data_func ("/ifupdate/source_dir_stanza", TEST_ENI_DIR, + (GTestDataFunc) test21_source_dir_stanza); return g_test_run (); } diff --git a/src/settings/plugins/ifupdown/tests/test21-source-dir-stanza b/src/settings/plugins/ifupdown/tests/test21-source-dir-stanza new file mode 100644 index 00000000..d0604ddc --- /dev/null +++ b/src/settings/plugins/ifupdown/tests/test21-source-dir-stanza @@ -0,0 +1 @@ +source-directory test21-source-dir-stanza.d diff --git a/src/settings/plugins/ifupdown/tests/test21-source-dir-stanza.d/test21-source-dir-stanza.eth0 b/src/settings/plugins/ifupdown/tests/test21-source-dir-stanza.d/test21-source-dir-stanza.eth0 new file mode 100644 index 00000000..81922cea --- /dev/null +++ b/src/settings/plugins/ifupdown/tests/test21-source-dir-stanza.d/test21-source-dir-stanza.eth0 @@ -0,0 +1,2 @@ +auto eth0 +iface eth0 inet dhcp |