Bug 44360 - Fix tests. kill the [ x"$foo and fix the double ==
Summary: Fix tests. kill the [ x"$foo and fix the double ==
Status: RESOLVED MOVED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-31 20:30 UTC by Dan Douglas
Modified: 2019-02-16 13:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Dan Douglas 2011-12-31 20:30:39 UTC

    
Comment 1 Dan Douglas 2011-12-31 21:09:20 UTC
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.
Comment 2 Rex Dieter 2012-03-02 11:05:40 UTC
I personally don't care about carrying the compatibility measures around forever either.  If you don't mind doing the work creating a patch to address the issues you posed, I'll be happy to review/commit it.
Comment 3 GitLab Migration User 2019-02-16 13:34:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/57.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.