[Portland-bugs] [Bug 44360] Fix tests. kill the [ x"$foo and fix the double ==
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Dec 31 21:09:20 PST 2011
https://bugs.freedesktop.org/show_bug.cgi?id=44360
--- Comment #1 from Dan Douglas <ormaaj at gmail.com> 2011-12-31 21:09:20 PST ---
As most are probably aware, the [ x"$var" = x"bar" ] convention used in many of
the xdg-utils scripts is a rather ludicrous compatibility measure that only
makes sense if extremely ancient Bourne shells need to be considered (which are
themselves incompatible in many ways with such supposedly POSIX-compliant
shells as Dash).
If that's the general attitude, that's ok, but the fact that old-style POSIX [
tests are broken in many places due to use of the == operator indicates that
nobody really cares about compatibility anyway. Any such test will fail on all
but Bash/Korn family shells' built-in test variants, and Gnu coreutils
standalone "test" command which allow the == operator as a non-standard
extension. Dash doesn't allow this, and neither would any of the
multiple-decades-old shells that might require the ugly x"$var" hack.
I could go through and fix all these if anyone really wants, but it should be a
simple enough task. I only bring it up after running across Freenode folks on
more than one occasion who feel the need to stick to this (AFAICT) unwritten
convention only to increase the likelihood that their patches are accepted.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Portland-bugs
mailing list