RegressionTests__Win32OperatingSystemTest.st
changeset 1352 e0d857144dbf
parent 1161 3d9b4eaddcf3
child 1392 c93700ea3e05
--- a/RegressionTests__Win32OperatingSystemTest.st	Fri Mar 11 12:41:00 2016 +0100
+++ b/RegressionTests__Win32OperatingSystemTest.st	Fri Mar 11 12:41:13 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "{ Package: 'exept:regression' }"
 
 "{ NameSpace: RegressionTests }"
@@ -21,6 +23,7 @@
     |handle alreadyExists lastErrorCode handleAndLastErrorCode|
 
     OperatingSystem isMSWINDOWSlike ifFalse:[
+        Transcript showCR:'test skipped (OS is not WINDOWS)'.
         ^ self.
     ].
 
@@ -44,6 +47,30 @@
     "
      self new testMutex
     "
+!
+
+testRegistry
+    |k hasContentType|
+
+    OperatingSystem isMSWINDOWSlike ifFalse:[
+        Transcript showCR:'test skipped (OS is not WINDOWS)'.
+        ^self.
+    ].
+    k := OperatingSystem registryEntry key:'HKEY_CLASSES_ROOT\MIME\Database\'.
+    self assert:(k notNil).
+
+    hasContentType := false.
+    k subKeyNamesAndClassesDo:[:nm :clsNm | 
+        "/ Transcript showCR:nm.
+        nm = 'Content Type' ifTrue:[hasContentType := true].
+    ].
+    self assert:hasContentType.
+
+    "/ k subKeysDo:[:k | Transcript showCR:k].
+
+    "
+     self new testRegistry
+    "
 ! !
 
 !Win32OperatingSystemTest class methodsFor:'documentation'!