How to destroy your work by running a test

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to destroy your work by running a test

Bert Freudenberg
Begin forwarded message:
From: laurent laffont <[hidden email]>
Date: 26. März 2010 22:11:44 MEZ
To: An open mailing list to discuss any topics related to an open-source Smalltalk <[hidden email]>
Subject: [Pharo-project] Squeak VM+FT2Plugin, all Pharo 1.0 rc3 tests green
Reply-To: [hidden email]

Fun story: if you don't have SecurityPlugin, LocaleTest>>testFontFullName   deletes your image :)
testFontFullName
"self debug: #testFontFullName"
| env dir |
env := (Locale isoLanguage: 'ja') languageEnvironment.
dir := FileDirectory on: SecurityManager default untrustedUserDirectory.
[dir recursiveDelete]   <-------------- Cool !!
on: Error
do: [:e | e].
env fontFullName.
self assert: dir exists


Cheers,

Laurent Laffont

... I've just removed the test from trunk, plus fixed the method it tested.

- Bert -