scop / bash-completion

Programmable completion functions for bash
GNU General Public License v2.0
2.9k stars 380 forks source link

test: add missing files in `test/t/unit/Makefile.am` #1132

Closed akinomyoga closed 6 months ago

akinomyoga commented 6 months ago

I separate a PR for the test for _comp_load from #1131.


Originally posted by @akinomyoga in https://github.com/scop/bash-completion/issues/1131#issuecomment-1987099039

Tests in test_unit_load_completion.py fail. Somehow, the symbolic link and the target are reversed in the tar ball.

$ LANG=C find test/fixtures/_comp_load -name cmd1 -ls
998988373      0 lrwxrwxrwx   1 murase   murase         19 Dec 25 05:23 test/fixtures/_comp_load/bin/cmd1 -> ../prefix1/bin/cmd1
1015156558      4 -rwxr-xr-x   1 murase   murase         10 Dec 25 05:23 test/fixtures/_comp_load/prefix1/bin/cmd1
1048877481      4 -rw-r--r--   1 murase   murase         56 Dec 25 05:23 test/fixtures/_comp_load/prefix1/share/bash-completion/completions/cmd1
1065355955      4 -rw-r--r--   1 murase   murase         57 Dec 25 05:23 test/fixtures/_comp_load/userdir1/completions/cmd1
$ LANG=C tar tvf bash-completion-2.12.0.tar.xz --no-anchored cmd1
-rwxr-xr-x murase/murase    10 2023-12-25 05:23 bash-completion-2.12.0/test/fixtures/_comp_load/bin/cmd1
hrwxr-xr-x murase/murase     0 2023-12-25 05:23 bash-completion-2.12.0/test/fixtures/_comp_load/prefix1/bin/cmd1 link to bash-completion-2.12.0/test/fixtures/_comp_load/bin/cmd1
-rw-r--r-- murase/murase    56 2023-12-25 05:23 bash-completion-2.12.0/test/fixtures/_comp_load/prefix1/share/bash-completion/completions/cmd1
-rw-r--r-- murase/murase    57 2023-12-25 05:23 bash-completion-2.12.0/test/fixtures/_comp_load/userdir1/completions/cmd1

Automake seems to specify the option -h (resolves symbolic links) to tar to create a tar ball.

tar --format=posix -chf - bash-completion-2.12.0