test 2 \n and \r\n

This commit is contained in:
lyon 2022-01-11 12:21:53 +08:00
parent d0d0a5294b
commit 5922e79403
15 changed files with 16 additions and 0 deletions

0
port/linux/api-make-linux.sh Normal file → Executable file
View File

0
port/linux/api-make-win10.sh Normal file → Executable file
View File

0
port/linux/api-make.sh Normal file → Executable file
View File

0
port/linux/ci_benchmark.sh Normal file → Executable file
View File

0
port/linux/gtest.sh Normal file → Executable file
View File

0
port/linux/init.sh Normal file → Executable file
View File

0
port/linux/install_dependency.sh Normal file → Executable file
View File

0
port/linux/make.sh Normal file → Executable file
View File

0
port/linux/pkg-push.sh Normal file → Executable file
View File

0
port/linux/pull-core.sh Normal file → Executable file
View File

0
port/linux/push-core.sh Normal file → Executable file
View File

0
port/linux/run.sh Normal file → Executable file
View File

0
port/linux/test-banchmark.sh Normal file → Executable file
View File

View File

@ -640,4 +640,20 @@ TEST(pikaMain, print_with_enter) {
/* deinit */
obj_deinit(pikaMain);
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(pikaMain, print_with_2enter) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj((char*)"pikaMain", New_PikaMain);
/* run */
__platform_printf((char*)"BEGIN\n");
obj_run(pikaMain, (char*)"print('test\\r\\n\\n')\n");
/* collect */
/* assert */
EXPECT_STREQ(log_buff[0], (char*)"test\r\n\n\r\n");
EXPECT_STREQ(log_buff[1], (char*)"BEGIN\n");
/* deinit */
obj_deinit(pikaMain);
EXPECT_EQ(pikaMemNow(), 0);
}

0
port/linux/update-compiler.sh Normal file → Executable file
View File