<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/ls, branch v8.18</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.18</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2012-05-12T14:19:38Z</updated>
<entry>
<title>ls: color each symlink-to-relative-name in / properly</title>
<updated>2012-05-12T14:19:38Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-05-10T17:43:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6124a3842dfa8484b52e067a8ab8105c3875a4f7'/>
<id>urn:sha1:6124a3842dfa8484b52e067a8ab8105c3875a4f7</id>
<content type='text'>
In order for ls --color to color each symlink, it must form the name
of each referent and then stat it to see if the link is dangling, to
a directory, to a file, etc.  When the symlink is to a relative name,
ls must concatenate the starting directory name and that relative name.
When, in addition, the starting directory was "/" or "/some-name",
the result was ill-formed, and the subsequent stat would usually fail,
making the caller color it as a dangling symlink.
* src/ls.c (make_link_name): Don't botch the case in which
dir_name(NAME) == "/" and LINKNAME is relative.
* tests/ls/root-rel-symlink-color: New file.  Test for the above.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
Reported by Mike Frysinger in http://bugs.gnu.org/11453
Bug introduced by commit v8.16-23-gbcb9078.
</content>
</entry>
<entry>
<title>tests: remove nearly all remaining backticks</title>
<updated>2012-04-04T10:22:24Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-04-03T19:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=33230a19ca27d99629a7c8000f56ecce22e956fa'/>
<id>urn:sha1:33230a19ca27d99629a7c8000f56ecce22e956fa</id>
<content type='text'>
* tests/rm/isatty: Remove now-unneeded "# `" line.
* tests/misc/ls-time: Likewise.
* tests/misc/date-sec: Remove stray "`" in comment.
* tests/du/long-sloop: Likewise.
* tests/mv/part-symlink: Replace multi-line `...` by $(...).
* tests/mv/sticky-to-xpart: Likewise.
* tests/rm/fail-2eperm: Likewise.
* tests/ls/nameless-uid: Likewise.
* tests/cp/perm: Likewise.
* tests/cp/preserve-gid: Likewise.
* tests/cp/same-file: Likewise.
</content>
</entry>
<entry>
<title>tests: convert nearly all `...` expressions to $(...)</title>
<updated>2012-04-04T10:20:56Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-04-03T18:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e43d30eab3215bc9ff49ec7db3d3e2baa95ba070'/>
<id>urn:sha1:e43d30eab3215bc9ff49ec7db3d3e2baa95ba070</id>
<content type='text'>
Exempt init.sh because it runs before we're assured to have a
shell that groks $(...).  Exempt *.mk because "$" would have to
be doubled, and besides, any `...` expression in a .mk file is
almost certainly evaluated before init.sh is run.  Finally, also
exempt the perl-based tests, because perl's `...` cannot be
converted to $(...).  Do that by running this command:

git grep -l '`.*`' tests \
  | grep -Ev 'init\.sh|\.mk$' | xargs grep -Lw perl \
  | xargs perl -pi -e 's/`(.*?)`/\$($1)/g'

One minor fix-up change was required after that, due to how
quoting differs:
diff --git a/tests/chmod/equals b/tests/chmod/equals
-    expected_perms=$(eval 'echo \$expected_'$dest)
+    expected_perms=$(eval 'echo $expected_'$dest)

Another was to make these required quoting adjustments:
diff --git a/tests/misc/stty b/tests/misc/stty
...
-  rev=$(eval echo "\\\$REV_$opt")
+  rev=$(eval echo "\$REV_$opt")
...
-      rev1=$(eval echo "\\\$REV_$opt1")
-      rev2=$(eval echo "\\\$REV_$opt2")
+      rev1=$(eval echo "\$REV_$opt1")
+      rev2=$(eval echo "\$REV_$opt2")

Also, transform two files that were needlessly excluded above:
(both use perl, but are mostly bourne shell)

  perl -pi -e 's/`(.*?)`/\$($1)/g' \
    tests/du/long-from-unreadable tests/init.cfg
</content>
</entry>
<entry>
<title>tests: convert one `...` expression manually</title>
<updated>2012-04-03T20:17:28Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-04-03T18:04:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=64ecea53d9b4c1ecbf6d02ff8c4ae98b3a82e9a2'/>
<id>urn:sha1:64ecea53d9b4c1ecbf6d02ff8c4ae98b3a82e9a2</id>
<content type='text'>
* tests/ls/stat-vs-dirent: Manually convert `(...)` to $(...),
to avoid automatically producing an invalid result.
</content>
</entry>
<entry>
<title>tests: compile and link shared object with $CC to make LD_PRELOAD work</title>
<updated>2012-02-29T09:01:50Z</updated>
<author>
<name>Bernhard Voelker</name>
<email>mail@bernhard-voelker.de</email>
</author>
<published>2012-02-27T20:13:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=409a7cc7ea877399d10ff15d875c68bd5edc3288'/>
<id>urn:sha1:409a7cc7ea877399d10ff15d875c68bd5edc3288</id>
<content type='text'>
* tests/ls/getxattr-speedup: Compile and link in one step with $CC.
If the shared object file is created by ld (binutils), then the
destructor print_call_count() may not run (seen on OpenSuSE 12.1).
See http://lists.opensuse.org/opensuse/2012-02/msg01342.html
Thanks to Cristian Rodríguez.
</content>
</entry>
<entry>
<title>tests: remove unnecessary use of -lc</title>
<updated>2012-02-26T08:37:31Z</updated>
<author>
<name>Bernhard Voelker</name>
<email>mail@bernhard-voelker.de</email>
</author>
<published>2012-02-24T11:22:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f19747455eb0f2e44a61582e16ee5a1a8c7af08d'/>
<id>urn:sha1:f19747455eb0f2e44a61582e16ee5a1a8c7af08d</id>
<content type='text'>
* tests/ls/getxattr-speedup: Remove unneeded use of -lc.
</content>
</entry>
<entry>
<title>tests: ls/getxattr-speedup: include &lt;sys/types.h&gt; for older headers</title>
<updated>2012-02-19T17:43:53Z</updated>
<author>
<name>Jérémy Compostella</name>
<email>jeremy.compostella@gmail.com</email>
</author>
<published>2012-02-19T14:38:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=933989eca67bd82f011595937002cc284c98772d'/>
<id>urn:sha1:933989eca67bd82f011595937002cc284c98772d</id>
<content type='text'>
Modern &lt;stdio.h&gt; provides ssize_t, but the one from Debian's
libc6-dev 2.11.2-10 apparently does not.
* tests/ls/getxattr-speedup: Also include &lt;sys/types.h&gt;.
</content>
</entry>
<entry>
<title>tests: test for ls speed-up</title>
<updated>2012-02-18T12:55:06Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-02-13T11:52:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b29db6767612cf70e9d4c7eb6ede9822f6173fca'/>
<id>urn:sha1:b29db6767612cf70e9d4c7eb6ede9822f6173fca</id>
<content type='text'>
* tests/ls/getxattr-speedup: New test.
* tests/Makefile.am (TESTS): Add it.
Improved-by: Bernhard Voelker
</content>
</entry>
<entry>
<title>maint: use single copyright year range</title>
<updated>2012-01-27T10:35:24Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-27T10:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d7878454cd02518959b0d6036db3a5b6ff00ca57'/>
<id>urn:sha1:d7878454cd02518959b0d6036db3a5b6ff00ca57</id>
<content type='text'>
Run "make update-copyright".
</content>
</entry>
<entry>
<title>tests: change `...' to '...' on lines not matching /[=\$]/</title>
<updated>2012-01-09T20:50:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-07T16:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dd0e4c5621ca2fa9255aef4eee0e7cf41cd335d2'/>
<id>urn:sha1:dd0e4c5621ca2fa9255aef4eee0e7cf41cd335d2</id>
<content type='text'>
Exempt lines with '$' or '=', since those are prone to improper
conversion.  Run this:
  git grep -l "\`[^']*'" tests \
   |xargs perl -pi -e '/[=\$]/ and next;s/\`([^'\''"]*?'\'')/'\''$1/g'
</content>
</entry>
</feed>
