X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/ca6309941ad6c33be6f70b0d27db1e8d8de4c922..5d7b80ce6f21d6d90ecec188f135e665d789dede:/tests/scripts.at diff --git a/tests/scripts.at b/tests/scripts.at index fdc0240..a546b61 100644 --- a/tests/scripts.at +++ b/tests/scripts.at @@ -599,3 +599,27 @@ AT_CHECK([test_fix_gnulib -i test.mk.in -o test.mk || exit grep SED_HEADER test.mk], [0], [expout]) AT_CLEANUP + +AT_SETUP([fix-gnulib.pl %reldir% substitution]) + +test_gnulib_mk sys_types >test.mk.in +AT_CHECK([grep '%reldir%' test.mk.in >/dev/null || exit 99]) + +sed -n -f - test.mk.in >expout <<'EOF' +${G;p;b} +/^## begin gnulib/,/^## end gnulib/!b +/^#/{p;b} +s|(srcdir)|(top_srcdir)| +s|%reldir%|lib| +s|BUILT_SOURCES|gnulib_core_headers| +s|sys[[/_]]|lib/&|g +/^MOSTLYCLEANFILES/{h;b} +p +EOF + +AT_CHECK([test_fix_gnulib -i test.mk.in -o test.mk || exit +sed -n -e '/^## begin gnulib/,/^## end gnulib/p' \ + -e '/CLEANFILES/p' test.mk], +[0], [expout]) + +AT_CLEANUP