2023-03-13 19:37:05 +08:00
|
|
|
#include "test_common.h"
|
|
|
|
TEST_START
|
|
|
|
#if !PIKA_NANO_ENABLE
|
|
|
|
|
|
|
|
TEST(os, test1) {
|
|
|
|
g_PikaMemInfo.heapUsedMax = 0;
|
|
|
|
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
|
|
|
|
extern unsigned char pikaModules_py_a[];
|
|
|
|
obj_linkLibrary(pikaMain, pikaModules_py_a);
|
|
|
|
/* run */
|
|
|
|
__platform_printf("BEGIN\r\n");
|
|
|
|
pikaVM_runSingleFile(pikaMain, "test/python/os/os_test1.py");
|
|
|
|
/* assert */
|
|
|
|
EXPECT_STREQ(log_buff[0], "PASS\r\n");
|
|
|
|
EXPECT_STREQ(log_buff[1], "Hello World!\r\n");
|
|
|
|
/* deinit */
|
|
|
|
obj_deinit(pikaMain);
|
|
|
|
EXPECT_EQ(pikaMemNow(), 0);
|
|
|
|
}
|
|
|
|
|
2023-04-23 20:55:20 +08:00
|
|
|
TEST_RUN_SINGLE_FILE_PASS(os, path, "test/python/os/os_path.py")
|
2023-03-26 20:43:51 +08:00
|
|
|
|
2023-03-13 19:37:05 +08:00
|
|
|
#endif
|
|
|
|
TEST_END
|