X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/65cd51576af61ad651c5f1546c4ded144017cfa4..188aeb2923283620ba772e37c6c4d6a7cb605b78:/tests/macros.at diff --git a/tests/macros.at b/tests/macros.at index 07d23ca..a085ad6 100644 --- a/tests/macros.at +++ b/tests/macros.at @@ -1,4 +1,4 @@ -dnl Copyright © 2014-2015, 2018-2019, 2021 Nick Bowler +dnl Copyright © 2014-2015, 2018-2019, 2021-2022 Nick Bowler dnl dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2. dnl This is free software: you are free to do what the fuck you want to. @@ -235,3 +235,365 @@ MOFILES = @&t@ ]]) AT_CLEANUP + +AT_SETUP([DX_LINGUAS with broken "join" utility]) +AT_KEYWORDS([DX_LINGUAS macro]) + +echo : >config.rpath +chmod +x config.rpath + +mkdir bin +cat >bin/join <tmp +mv -f tmp Makefile.in +AT_CHECK([make -s do_test >rebuild.out && + sed '/^config.status:/,$!d' rebuild.out], [0], +[[config.status: creating Makefile +config.status: executing depfiles commands +config.status: executing gnulib-symfiles commands +d.glsym +/// +a.o +c.o +e.o +]]) + +AT_CLEANUP + +AT_SETUP([DX_GNULIB_SYMFILES separate srcdir]) +AT_KEYWORDS([DX_GNULIB_SYMFILES macro vpath]) + +TEST_SYMFILES_INIT +AT_DATA([symfiles.lst]) +TEST_AUTORECONF + +mkdir build && cd build +TEST_CONFIGURE([], [../configure]) +AT_CHECK([make -s do_test], [0], [[ +/// +a.o +b.o +c.o +d.o +e.o +]]) +cd .. + +AT_CLEANUP + +AT_SETUP([DX_GNULIB_SYMFILES shortname]) +AT_KEYWORDS([DX_GNULIB_SYMFILES macro]) + +TEST_SYMFILES_INIT + +sed '/GNULIB_SYMFILES/c\ +[DX_GNULIB_SYMFILES([symfiles.lst], [x])]' configure.ac >configure.tmp +sed '/gnulib_objects/s|$| a/b.o a/b/c.o|' Makefile.am >Makefile.tmp +mv -f configure.tmp configure.ac +mv -f Makefile.tmp Makefile.am + +AT_DATA([symfiles.lst], +[[b.c +c.c +d.c +e.c +]]) +TEST_AUTORECONF + +TEST_CONFIGURE +AT_CHECK([make -s do_test], [0], +[[b.glsym +c.glsym +d.glsym +e.glsym +/// +a/b/x-c.o +a/x-b.o +x-a.o +]]) + +AT_CLEANUP + +AT_SETUP([DX_GNULIB_SYMFILES distribution]) +AT_KEYWORDS([DX_GNULIB_SYMFILES macro]) + +TEST_CONFIGURE_AC([[AM_INIT_AUTOMAKE([foreign]) +DX_GNULIB_SYMFILES([symfiles.lst]) +AC_CONFIG_FILES([Makefile]) +]]) + +AT_DATA([symfiles.lst]) +AT_DATA([Makefile.am], +[[foo: ; printf '%s\n' $(top_srcdir) $(DISTFILES) +]]) +TEST_AUTORECONF + +TEST_CONFIGURE +AT_CHECK([make -s foo], [0], [stdout]) +AT_CHECK([exec 3