Skip to content

Remove extraneous ! from test commands#7

Open
deriamis wants to merge 1 commit intoeth-p:masterfrom
deriamis:fix-extraneous-bang
Open

Remove extraneous ! from test commands#7
deriamis wants to merge 1 commit intoeth-p:masterfrom
deriamis:fix-extraneous-bang

Conversation

@deriamis
Copy link
Copy Markdown

I was running tests in eth-p/best, where I received errors like the following:

[FAIL] compare_eq           :: Exited with code 134.
[FAIL] compare_ge           :: Exited with code 134.
[FAIL] compare_gt           :: Exited with code 134.
[FAIL] compare_le           :: Exited with code 134.
[FAIL] compare_lt           :: Exited with code 134.
[FAIL] compare_ne           :: Exited with code 134.

I traced the problem back to this repo, and it looks like the command is being executed with the ! in front of it, which is (I think?) supposed to be syntax for the expect function. I am not sure why this was working before, but at least on Bash version 5.2.15, this causes the error above. When the ! is shifted out of the args, the error goes away and all test pass.

The `expect` and `assert` functions both accept `!` as their first
argument, which negates the test. However, those functions were
putting the `!` into the executed command, which is not correct
shell syntax and can cause exrtraneous errors. The `!` is now
`shift`ed out of the args and only the tested command is run.
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

Successfully merging this pull request may close these issues.

1 participant