mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Have redbean Lua repl show utf-8 when it's valid
Otherwise EncodeLua() will assume strings are binary and display them using hex sequences.
This commit is contained in:
parent
31e4b0867b
commit
ce5cb8a2f8
10 changed files with 217 additions and 35 deletions
|
@ -212,8 +212,13 @@ testonly void testlib_runtestcases(testfn_t *start, testfn_t *end,
|
|||
*/
|
||||
const testfn_t *fn;
|
||||
CopySignalHandlers();
|
||||
CHECK_NOTNULL(getcwd(g_testlib_olddir, sizeof(g_testlib_olddir)));
|
||||
if (weaken(testlib_enable_tmp_setup_teardown_once)) SetupTmpDir();
|
||||
if (weaken(testlib_enable_tmp_setup_teardown) ||
|
||||
weaken(testlib_enable_tmp_setup_teardown_once)) {
|
||||
CHECK_NOTNULL(getcwd(g_testlib_olddir, sizeof(g_testlib_olddir)));
|
||||
}
|
||||
if (weaken(testlib_enable_tmp_setup_teardown_once)) {
|
||||
SetupTmpDir();
|
||||
}
|
||||
if (weaken(SetUpOnce)) weaken(SetUpOnce)();
|
||||
for (x = 0, fn = start; fn != end; ++fn) {
|
||||
if (weaken(testlib_enable_tmp_setup_teardown)) SetupTmpDir();
|
||||
|
@ -231,6 +236,10 @@ testonly void testlib_runtestcases(testfn_t *start, testfn_t *end,
|
|||
CheckForSignalHandlers();
|
||||
CheckForZombies();
|
||||
}
|
||||
if (weaken(TearDownOnce)) weaken(TearDownOnce)();
|
||||
if (weaken(testlib_enable_tmp_setup_teardown_once)) TearDownTmpDir();
|
||||
if (weaken(TearDownOnce)) {
|
||||
weaken(TearDownOnce)();
|
||||
}
|
||||
if (weaken(testlib_enable_tmp_setup_teardown_once)) {
|
||||
TearDownTmpDir();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue