{"thread":{"id":"823","subject":"[PATCH] git-tar-tree: do only basic tests in t/t5000-git-tar-tree.sh","startedAt":"2005-06-03T16:21:23Z","lastAt":"2005-06-03T16:21:23Z","messageCount":1,"participants":["Rene Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"4497","messageId":"20050603162123.GA11107@lsrfire.ath.cx","threadId":"823","inReplyTo":null,"subject":"[PATCH] git-tar-tree: do only basic tests in t/t5000-git-tar-tree.sh","fromName":"Rene Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2005-06-03T16:21:23Z","receivedAt":"2005-06-03T16:21:23Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"git-tar-tree: remove tests of long path handling out of t5000-tar-tree.sh\nand make test script cope with tar programs displaying file modification\ndate as hh:mm (newer variants show it as hh:mm:ss).\n\nThis makes the test cover only basic functionality that is expected to\nbe handled even by older tar programs.  Tests for long filenames (which\nrequire pax extended headers) can be added separately.\n\nI ran this test successfully with GNU tar 1.13, 1.14 and 1.15.1.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n\n--- a/t/t5000-tar-tree.sh\n+++ b/t/t5000-tar-tree.sh\n@@ -5,17 +5,13 @@\n \n test_description='git-tar-tree and git-get-tar-commit-id test\n \n-This test covers the topics of long paths, file contents, commit date\n-handling and commit id embedding:\n-\n-  Paths longer than 100 characters require the use of a pax extended\n-  header to store them.  The test creates files with pathes both longer\n-  and shorter than 100 chars, and also checks symlinks with long and\n-  short pathes both as their own name and as target path.\n+This test covers the topics of file contents, commit date handling and\n+commit id embedding:\n \n   The contents of the repository is compared to the extracted tar\n   archive.  The repository contains simple text files, symlinks and a\n-  binary file (/bin/sh).\n+  binary file (/bin/sh).  Only pathes shorter than 99 characters are\n+  used.\n \n   git-tar-tree applies the commit date to every file in the archive it\n   creates.  The test sets the commit date to a specific value and checks\n@@ -33,20 +29,10 @@\n test_expect_success \\\n     'populate workdir' \\\n     'mkdir a b c &&\n-     p48=1.......10........20........30........40......48 &&\n-     p50=1.......10........20........30........40........50 &&\n-     p98=${p48}${p50} &&\n      echo simple textfile >a/a &&\n-     echo 100 chars in path >a/${p98} &&\n-     echo 101 chars in path >a/${p98}x &&\n-     echo 102 chars in path >a/${p98}xx &&\n-     echo 103 chars in path >a/${p98}xxx &&\n      mkdir a/bin &&\n-     cp /bin/sh a/bin/sh &&\n+     cp /bin/sh a/bin &&\n      ln -s a a/l1 &&\n-     ln -s ${p98}xx a/l100 &&\n-     ln -s ${p98}xxx a/l101 &&\n-     ln -s ${p98}xxx a/l${p98} &&\n      (cd a && find .) | sort >a.lst'\n \n test_expect_success \\\n@@ -64,7 +50,8 @@\n \n test_expect_success \\\n     'validate file modification time' \\\n-    'tar tvf b.tar a/a | awk \\{print\\ \\$4,\\$5\\} >b.mtime &&\n+    'tar tvf b.tar a/a |\n+     awk \\{print\\ \\$4,\\ length\\(\\$5\\)\\<7\\ ?\\ \\$5\\\":00\\\"\\ :\\ \\$5\\} >b.mtime &&\n      echo \"2005-05-27 22:00:00\" >expected.mtime &&\n      diff expected.mtime b.mtime'\n \n"}]}