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

Failed P_A_C_K_E_R.unpack test #2078

Open
Infocatcher opened this issue Jul 5, 2022 · 2 comments · May be fixed by #2262
Open

Failed P_A_C_K_E_R.unpack test #2078

Infocatcher opened this issue Jul 5, 2022 · 2 comments · May be fixed by #2262

Comments

@Infocatcher
Copy link
Contributor

Tests output:

==== P_A_C_K_E_R.unpack ============================================================
---- input -------
function test (){alert ('This is a test!')}; eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\b'+e(c)+'\b','g'),k[c]);return p}('0 2=\'{Íâ–+›ï;ã†Ù¥#\'',3,3,'var||a'.split('|'),0,{}))
---- expected ----
function test (){alert ('This is a test!')}; var a='{Íâ–+›ï;ã†Ù¥#'
---- output ------
function test (){alert ('This is a test!')}; 0 2='{Íâ–+›ï;ã†Ù¥#'
---- expected-ws ------
function_test_(){alert_('This_is_a_test!')};_var_a='{Íâ–+›ï;ã†Ù¥#'
---- output-ws ------
function_test_(){alert_('This_is_a_test!')};_0_2='{Íâ–+›ï;ã†Ù¥#'
================================================================

1 tests failed.

Looks like not depends on js-engine: I see that with latest Chrome 102 (Vivaldi) and with WSH's JScript.

Also how to show hidden block with "Run the tests" on https://beautifier.io without dev tools?

@bitwiseman
Copy link
Member

@Infocatcher
I think in the formatting update some functionality was lost. Please file a separate bug for that (and maybe a PR to fix it).

As to the Packer failure, I do not know. Sorry. If this is an area that matters to you, you'll need to dig and find a solution.

@Infocatcher
Copy link
Contributor Author

This bug report comes from my attempts to eliminate issues, that cused by MS WSH/JScript limitations (https://github.com/Infocatcher/AkelPad_scripts/blob/2022-08-02/jsBeautifier.js#L10000-L10045), so this is not a real problem for me, but if I find something else or possible fix, I'll post new issue or PR.

Infocatcher added a commit to Infocatcher/AkelPad_scripts that referenced this issue Mar 26, 2024
Infocatcher added a commit to Infocatcher/js-beautify that referenced this issue Mar 26, 2024
@Infocatcher Infocatcher linked a pull request Mar 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants