Andreas Raab uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ar.45.mcz==================== Summary ====================
Name: Tests-ar.45
Author: ar
Time: 8 February 2010, 2:30:41.481 pm
UUID: 9908792e-0159-5a49-816a-7f4db1ae85f9
Ancestors: Tests-nice.44
Add a consistency test to ensure that the Windows VM's 3ButtonMouse preference is consistent with the swapMouseButton setting.
=============== Diff against Tests-nice.44 ===============
Item was added:
+ ----- Method: Win32VMTest>>testWinVM3ButtonMousePreference (in category 'tests') -----
+ testWinVM3ButtonMousePreference
+ "Ensure that swapMouseButtons agrees with 3ButtonMouse preference"
+ | iniData iniPref exePath |
+ SmalltalkImage current platformName = 'Win32' ifFalse:[^self].
+ exePath := SmalltalkImage current getSystemAttribute: 0.
+ iniData := [
+ (FileStream readOnlyFileNamed: (exePath copyUpToLast: $.), '.ini')
+ contentsOfEntireFile
+ ] on: Error do:[:ex| ex return: ''].
+ iniPref := false. "default is OFF"
+ iniData linesDo:[:line|
+ (line beginsWith: '3ButtonMouse') ifTrue:[
+ iniPref := (line copyAfter: $=) withBlanksTrimmed ~= '0'.
+ ].
+ ].
+ self assert: iniPref = Preferences swapMouseButtons.
+ !
Item was added:
+ TestCase subclass: #Win32VMTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-VM'!