You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered a problem with the javascript mvdan/sh library, specifically with the parser's InteractiveStep and Incomplete methods.
In my understanding, when InteractiveStep encounters a string like echo " or echo ', InteractiveStep returns an empty array. And when the Incomplete method is subsequently invoked, it returns true, indicating that InteractiveStep is awaiting the end of the current statement, i.e., the closing double or single quote.
However, my tests indicate that while this behavior is as expected for single quotes echo ', it does not hold for double quotes echo ". In the latter case, the Incomplete method returns false instead of true.
I have written a test that emulates the style of __js/testmain.js:
Hello,
I have encountered a problem with the javascript mvdan/sh library, specifically with the parser's InteractiveStep and Incomplete methods.
In my understanding, when InteractiveStep encounters a string like
echo "
orecho '
, InteractiveStep returns an empty array. And when the Incomplete method is subsequently invoked, it returns true, indicating that InteractiveStep is awaiting the end of the current statement, i.e., the closing double or single quote.However, my tests indicate that while this behavior is as expected for single quotes
echo '
, it does not hold for double quotesecho "
. In the latter case, the Incomplete method returns false instead of true.I have written a test that emulates the style of
__js/testmain.js
:The test fails with the following error:
I am currently using version "0.10.1" of the mvdan-sh library.
Could you please help with this issue?
Thank you in advance.
The text was updated successfully, but these errors were encountered: