]> git.draconx.ca Git - dxcommon.git/blobdiff - tests/scripts.at
fix-gnulib: Patch %reldir% too.
[dxcommon.git] / tests / scripts.at
index fdc0240ad25ee54e1b4d1f6a2c1383a56ea430a8..a546b61a557240ae8b10a26065c8cee4a1a275aa 100644 (file)
@@ -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