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 the executed outputs of the original script and the script after a shasta roundtrip #6

Open
BolunThompson opened this issue Dec 17, 2024 · 0 comments

Comments

@BolunThompson
Copy link
Contributor

Right now, the tests work by comparing the pretty printed output of parsing the test script, and the pretty printed output of that first roundtrip parsed again. However, that may miss certain bugs. For example, using bash:

case 1 in
    1) echo "1";&  
    2) echo "2";;
esac  

should print:

1
2

since the first case should fall through to the second. However, there used to be a bug where it was instead parsed as:

case 1 in
    1) echo "1";;  
    2) echo "2";;
esac  

with no fall through. This passed the tests since the first and second round trips are the same, despite the different semantics. Adding additional tests to compare the execution would fix this. I don’t think this would cause an issue, as long as we filter out any tests that don’t terminate or are otherwise misbehaved.

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

No branches or pull requests

1 participant