RegressionTests__Win32OLETests.st
changeset 1707 76213a555906
parent 1447 2351db93aa5b
child 1722 54ee95429abb
--- a/RegressionTests__Win32OLETests.st	Mon Sep 18 14:52:18 2017 +0200
+++ b/RegressionTests__Win32OLETests.st	Tue Sep 19 10:12:30 2017 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "{ Package: 'stx:goodies/regression' }"
 
 "{ NameSpace: RegressionTests }"
@@ -47,6 +49,8 @@
 test01_SysAllocString
     |ole rslt bstr|
 
+    self skipIf:[OperatingSystem isMSWINDOWSlike not] description:'test skipped (OS is not WINDOWS)'.
+
     ole := OLEAutomationDLL current.
     rslt := ole SysAllocString: 'hello World'.
 
@@ -64,22 +68,24 @@
 test02_GuidFromProgID
     |guid|
 
+    self skipIf:[OperatingSystem isMSWINDOWSlike not] description:'test skipped (OS is not WINDOWS)'.
+
     self
-	should:[
-	    guid := (GUID clsidFromProgID:'Foo.Bar').
-	] raise:OLEError.
+        should:[
+            guid := (GUID clsidFromProgID:'Foo.Bar').
+        ] raise:OLEError.
 
     OLEError handle:[:ex |
-	ex hresult = (OLEStatusCodeConstants at:#CO_E_CLASSSTRING) ifTrue:[
-	    "/ kind of expected - you machine has no AcroPDF installed...
-	    Transcript showCR:'OLE: class not found: AcroPDF.PDF'
-	] ifFalse:[
-	    self assert:false description:'unexpected error code'.
-	]
+        ex hresult = (OLEStatusCodeConstants at:#CO_E_CLASSSTRING) ifTrue:[
+            "/ kind of expected - you machine has no AcroPDF installed...
+            Transcript showCR:'OLE: class not found: AcroPDF.PDF'
+        ] ifFalse:[
+            self assert:false description:'unexpected error code'.
+        ]
     ] do:[
-	guid := (GUID clsidFromProgID:'AcroPDF.PDF').
-	self assert:(guid notNil).
-	"/ self assert:(guid printString = '').
+        guid := (GUID clsidFromProgID:'AcroPDF.PDF').
+        self assert:(guid notNil).
+        "/ self assert:(guid printString = '').
     ].
 
      guid := (GUID clsidFromProgID:'InternetExplorer.Application').
@@ -104,6 +110,8 @@
 test03_verbsEnumerator
     |clsID enumerator nextVerb|
 
+    self skipIf:[OperatingSystem isMSWINDOWSlike not] description:'test skipped (OS is not WINDOWS)'.
+
     clsID := GUID clsidFromProgID:'InternetExplorer.Application'.
     self assert:clsID notNil.
     self assert:(clsID printString = '{0002DF01-0000-0000-C000-000000000046}').
@@ -126,15 +134,17 @@
     |guid iDispatch iWebBrowser iWebBrowserApp iWebBrowser2
      ids visibleID params result specTable|
 
+    self skipIf:[OperatingSystem isMSWINDOWSlike not] description:'test skipped (OS is not WINDOWS)'.
+
     guid := (GUID clsidFromProgID:'InternetExplorer.Application').
     self assert:(guid notNil).
     self assert:(guid printString = '{0002DF01-0000-0000-C000-000000000046}').
 
     iDispatch := IClassFactory
-		createInstance:guid
-		iid: (OLEInterface oleConstantAt:'IID_IDispatch')
-		controllingUnknown:nil
-		context:(OLEInterface oleConstantAt:'CLSCTX_ALL').
+                createInstance:guid
+                iid: (OLEInterface oleConstantAt:'IID_IDispatch')
+                controllingUnknown:nil
+                context:(OLEInterface oleConstantAt:'CLSCTX_ALL').
     self assert:(iDispatch notNil).
 
     self assert:(iDispatch hasTypeInfo).