[Scummvm-git-logs] scummvm master -> a9fe1d7a845345336902843333914b1727030674

phcoder phcoder at gmail.com
Sun Nov 15 22:58:15 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a9fe1d7a84 TEST: Skip CJK tests outside of POSIX


Commit: a9fe1d7a845345336902843333914b1727030674
    https://github.com/scummvm/scummvm/commit/a9fe1d7a845345336902843333914b1727030674
Author: Vladimir Serbinenko (phcoder at google.com)
Date: 2020-11-15T23:57:53+01:00

Commit Message:
TEST: Skip CJK tests outside of POSIX

They need file access that needs null backend which for now only
peopwely compiles on POSIX.

Changed paths:
    test/common/encoding.h
    test/module.mk


diff --git a/test/common/encoding.h b/test/common/encoding.h
index 6bba9a961b..8eeda0299c 100644
--- a/test/common/encoding.h
+++ b/test/common/encoding.h
@@ -4,9 +4,18 @@
 #include "common/ustr.h"
 #include "../null_osystem.h"
 
+// We support CJK on all the platforms but it relies on OSystem to read
+// file which *in test environments* is available only on some platforms
+#if defined(POSIX)
+#define TEST_CJK 1
+#else
+#define TEST_CJK 0
+#endif
+
 class EncodingTestSuite : public CxxTest::TestSuite
 {
 public:
+#if TEST_CJK
 	void test_korean() {
 		Common::install_null_g_system();
 		const byte utf8[] = {
@@ -122,6 +131,7 @@ public:
 		TS_ASSERT(strcmp((const char *) utf8, cp932_to_utf8.c_str()) == 0);
 		TS_ASSERT(strcmp((const char *) cp932, utf8_to_cp932.c_str()) == 0);
 	}
+#endif
 
 	void test_conversion_unicode_machine_endian() {
 		Common::install_null_g_system();
diff --git a/test/module.mk b/test/module.mk
index 20c877865e..8235807af3 100644
--- a/test/module.mk
+++ b/test/module.mk
@@ -6,15 +6,20 @@
 ######################################################################
 
 TESTS        := $(srcdir)/test/common/*.h $(srcdir)/test/audio/*.h $(srcdir)/test/math/*.h
-TEST_LIBS    := test/null_osystem.o \
+TEST_LIBS    :=
+
+ifdef POSIX
+TEST_LIBS += test/null_osystem.o \
 	backends/fs/posix/posix-fs-factory.o \
 	backends/fs/posix/posix-fs.o \
 	backends/fs/posix/posix-iostream.o \
 	backends/fs/abstract-fs.o \
 	backends/fs/stdiostream.o \
 	backends/modular-backend.o \
-	test/stubs.o \
-	audio/libaudio.a math/libmath.a common/libcommon.a
+	test/stubs.o
+endif
+
+TEST_LIBS +=	audio/libaudio.a math/libmath.a common/libcommon.a
 
 ifeq ($(ENABLE_WINTERMUTE), STATIC_PLUGIN)
 	TESTS += $(srcdir)/test/engines/wintermute/*.h




More information about the Scummvm-git-logs mailing list