Skip to content

Commit

Permalink
Merge pull request #8457 from samakhov/8377-Fix-testOpenLog-should-no…
Browse files Browse the repository at this point in the history
…t-let-files-on-disk

Clean the log file created on the disk by the test
  • Loading branch information
MarcusDenker committed Feb 2, 2021
2 parents d103623 + 96dfd3b commit 4d2cbd0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/System-Support-Tests/SmalltalkImageTest.class.st
Expand Up @@ -114,7 +114,10 @@ SmalltalkImageTest >> testOpenLog [
"Other cases where a file with the given name can not be created."
self
writeToLogWithFileNamed: '';
writeToLogWithFileNamed: '.'
writeToLogWithFileNamed: '.'.

"clean the created log file"
'file.log' asFileReference ensureDelete

]

Expand All @@ -126,6 +129,7 @@ SmalltalkImageTest >> writeToLogWithFileNamed: filename [
[
| stream |
stream := Smalltalk image openLog.
stream nextPutAll: 'foobar' "We just make sure we can write something. I don't know any reliable way to check if it has really been written" ]
stream nextPutAll: 'foobar'."We just make sure we can write something. I don't know any reliable way to check if it has really been written"
Smalltalk closeLog: stream ]
ensure: [ Smalltalk logFileName: oldLogFileName ]
]

0 comments on commit 4d2cbd0

Please sign in to comment.