From f9f90837641694619d184cf2ab8b5c03c46b08dd Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 19 Jun 2008 17:51:43 +0200 Subject: MLKLowLevelTests: Add -testInitialReadtable. --- GNUmakefile | 8 ++++---- MLKLowLevelTests.m | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index e8f3e08..3bdc97a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -49,8 +49,8 @@ etshell_OBJC_LIBS += -lStepTalk -lreadline -lncurses -lToiletKit \ etshell_OBJCFLAGS = -w BUNDLE_NAME = Test -Test_OBJC_FILES = $(ToiletKit_OBJC_FILES) MLKLowLevelTests.m -Test_OBJC_LIBS = -lUnitKit +Test_OBJC_FILES = MLKLowLevelTests.m +Test_OBJC_LIBS = -lUnitKit -LToiletKit.framework -lToiletKit -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/bundle.make @@ -67,8 +67,8 @@ before-etshell:: #after-clean:: # -rmdir $(GNUSTEP_OBJ_DIR)/StepTalkShell -test: Test - ukrun Test.bundle +test: ToiletKit Test + env LD_LIBRARY_PATH=`pwd`/ToiletKit.framework/Versions/Current:/usr/local/lib ukrun Test.bundle run: before-etshell ToiletKit etshell env LD_LIBRARY_PATH=`pwd`/ToiletKit.framework/Versions/Current:/usr/local/lib obj/etshell diff --git a/MLKLowLevelTests.m b/MLKLowLevelTests.m index d4c478d..3214f7c 100644 --- a/MLKLowLevelTests.m +++ b/MLKLowLevelTests.m @@ -23,6 +23,8 @@ #include "MLKDynamicContext.h" #include "MLKEnvironment.h" #include "MLKLinkedList.h" +#include "MLKPackage.h" +#include "MLKReadtable.h" #include "MLKSymbol.h" @interface MLKLowLevelTests : NSObject @@ -80,6 +82,24 @@ } +-(id) testInitialReadtable +{ + MLKDynamicContext *ctx = [MLKDynamicContext currentContext]; + MLKReadtable *readtable = [ctx valueForBinding: + [[MLKPackage findPackage:@"COMMON-LISP"] + intern:@"*READTABLE*"]]; + UKTrue ([readtable characterHasCase:'a']); + UKTrue ([readtable characterHasCase:'x']); + UKTrue ([readtable characterHasCase:'F']); + UKTrue ([readtable characterHasCase:228]); // ä + UKTrue ([readtable characterHasCase:196]); // Ä + UKFalse ([readtable characterHasCase:'=']); + UKFalse ([readtable characterHasCase:'.']); + UKFalse ([readtable characterHasCase:223]); // ß + + return nil; +} + -(id) testStuff { // UKPass(); UKFail(); -- cgit v1.2.3