* tests/append01.at: Use m4_pushdef/m4_popdef to define local macros.
* tests/delete03.at: Likewise.
* tests/exclude06.at: Likewise.
* tests/incr04.at: Likewise.
* tests/link03.at: Likewise.
* tests/long01.at: Likewise.
* tests/longv7.at: Likewise.
* tests/lustar01.at: Likewise.
* tests/lustar02.at: Likewise.
* tests/lustar03.at: Likewise.
* tests/multiv05.at: Likewise.
* tests/sparse04.at: Likewise.
AT_SETUP([appending files with long names])
AT_KEYWORDS([append append01])
-m4_define([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX])
+m4_pushdef([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX])
AT_TAR_CHECK([
mkdir PREFIX
],
[],[],[],[oldgnu, ustar, posix, gnu])
+m4_popdef([PREFIX])
AT_CLEANUP
AT_SETUP([deleting members with long names])
AT_KEYWORDS([delete delete03])
-m4_define([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX])
+m4_pushdef([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX])
AT_TAR_CHECK([
./PREFIX[]9
],[],[],[],[gnu, oldgnu, posix])
+m4_popdef([PREFIX])
AT_CLEANUP
AT_SETUP([exclude: long files in pax archives])
AT_KEYWORDS([exclude exclude06])
-m4_define([test_base_dir],[one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen])
+m4_pushdef([test_base_dir],[one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen])
AT_TAR_CHECK([
AT_TAR_MKHIER(test_base_dir)
[],
[pax])
+m4_popdef([test_base_dir])
AT_CLEANUP
AT_SETUP([proper icontents initialization])
AT_KEYWORDS([incremental incr04 icontents])
-m4_define([NAME_PREFIX],[a/b/one_31_chars_long_file_name_])
+m4_pushdef([NAME_PREFIX],[a/b/one_31_chars_long_file_name_])
AT_TAR_CHECK([
AT_TAR_MKHIER(a/b)
tar: a/c: Directory has been renamed from 'a/b'
],[],[],[gnu, oldgnu, posix])
+m4_popdef([NAME_PREFIX])
AT_CLEANUP
# End of incr04.at
AT_SETUP([working -l with --remove-files])
AT_KEYWORDS([hardlinks link03])
-m4_define([create_files],[
+m4_pushdef([create_files],[
genfile -l 64 -f file1
ln file1 file2
ln file2 file3
[tar: Missing links to 'file1'.
])
+m4_popdef([create_files])
AT_CLEANUP
AT_KEYWORDS([longname long512])
dnl Create a directory structure with maximum directory name length 512-16
-m4_define([NAME],[0123456789abcde])
-m4_define([FULLNAME],NAME)
+m4_pushdef([NAME],[0123456789abcde])
+m4_pushdef([FULLNAME],NAME)
m4_for([N],0,29,,[m4_define([FULLNAME],FULLNAME/NAME)])
AT_TAR_CHECK([
],
[],[],[],[gnu,oldgnu])
+m4_popdef([NAME])
+m4_popdef([FULLNAME])
AT_CLEANUP
AT_SETUP([long names in V7 archives])
AT_KEYWORDS([longname longv7])
-m4_define([DIR],[this_is_a_very_long_name_for_a_directory_which_causes_problems])
-m4_define([FILE],[this_is_a_very_long_file_name_which_raises_issues.c])
+m4_pushdef([DIR],[this_is_a_very_long_name_for_a_directory_which_causes_problems])
+m4_pushdef([FILE],[this_is_a_very_long_file_name_which_raises_issues.c])
AT_TAR_CHECK([
mkdir DIR
],
[],[],[v7])
+m4_popdef([FILE])
+m4_popdef([DIR])
AT_CLEANUP
AT_SETUP([ustar: unsplittable file name])
AT_KEYWORDS([longname ustar lustar01])
-m4_define([LONGNAME],
+m4_pushdef([LONGNAME],
[this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix])
AT_TAR_CHECK([
tar: Exiting with failure status due to previous errors
],[],[],[ustar])
+m4_popdef([LONGNAME])
AT_CLEANUP
AT_SETUP([ustar: unsplittable path name])
AT_KEYWORDS([longname ustar lustar02])
-m4_define([PREFIX_155],
+m4_pushdef([PREFIX_155],
[this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be])
-m4_define([DIR_155],
+m4_pushdef([DIR_155],
[this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be])
-m4_define([NAME], [tween_name_and_prefix])
+m4_pushdef([NAME], [tween_name_and_prefix])
AT_TAR_CHECK([
AT_TAR_MKHIER(PREFIX_155,NAME)
tar: Exiting with failure status due to previous errors
],[],[],[ustar])
+m4_popdef([NAME])
+m4_popdef([DIR_155])
+m4_popdef([PREFIX_155])
+
AT_CLEANUP
AT_SETUP([ustar: splitting long names])
AT_KEYWORDS([longname ustar lustar03])
-m4_define([DIR_155],
+m4_pushdef([DIR_155],
[this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be])
-m4_define([NAME], [file])
+m4_pushdef([NAME], [file])
AT_TAR_CHECK([
AT_TAR_MKHIER(DIR_155,NAME)
],
[],[],[],[ustar])
+m4_popdef([NAME])
+m4_popdef([DIR_155])
AT_CLEANUP
AT_SETUP([Restoring after an out of sync volume])
AT_KEYWORDS([multivolume multiv multiv05 sync])
-m4_define([FILELIST],[jeden,dwa,trzy,cztery,piec,szesc])
+m4_pushdef([FILELIST],[jeden,dwa,trzy,cztery,piec,szesc])
AT_TAR_CHECK([
exec <&-
[tar: 'trzy' is not continued on this volume
],[],[], [gnu])
+m4_popdef([FILELIST])
AT_CLEANUP
# References: <201011250026.44908.kdudka@redhat.com>,
# http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00099.html
-m4_define([NAME_111],
+m4_pushdef([NAME_111],
[123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960])
AT_TAR_CHECK([
[],
[pax])
+m4_popdef([NAME_111])
AT_CLEANUP