summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-19 17:51:43 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-19 17:51:43 +0200
commitf9f90837641694619d184cf2ab8b5c03c46b08dd (patch)
treea231a0f0a90105a6aedfb13d6e19a7e1616c2c1f
parent8c290062cb26e7e1e63e365085a893c85be267c8 (diff)
MLKLowLevelTests: Add -testInitialReadtable.
-rw-r--r--GNUmakefile8
-rw-r--r--MLKLowLevelTests.m20
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 <UKTest>
@@ -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();