Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test a = a b: undetected error #739

Open
McDutchie opened this issue Apr 4, 2024 · 2 comments
Open

test a = a b: undetected error #739

McDutchie opened this issue Apr 4, 2024 · 2 comments
Labels
bug Something is not working

Comments

@McDutchie
Copy link

McDutchie commented Apr 4, 2024

In https://bugs.debian.org/1068340, Vincent Lefevre reports:

Package: ksh93u+m
Version: 1.0.8-1
Severity: normal

$ test a = a b ; echo $?
0

while this should be an error.

Further discussion (thread): https://www.mail-archive.com/austin-group-l@opengroup.org/msg12484.html

@McDutchie McDutchie added the bug Something is not working label Apr 4, 2024
@McDutchie
Copy link
Author

The behaviour is identical in the original Bourne shell (tested /bin/sh on Solaris 9) and on ksh88.

@vinc17fr
Copy link

vinc17fr commented Apr 7, 2024

However, it could have been just a missing test for error (i.e. possibly a bug unknown at that time). Or was this done on purpose and documented? Or at least a case that was checked in the testsuite? And are there scripts that expect this behavior? I could imagine that after the equal, one may have something with a * character to perform an expansion (globbing), so that the test would be done against the first expanded word.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

No branches or pull requests

2 participants