From 3360ff88ed99b893fb94a41d3576891122c5588f Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Fri, 20 Jun 2025 17:38:57 +0200 Subject: [PATCH] Add edge case test for a new recent feature --- src/TinyLogger-Tests/TinyLoggerTest.class.st | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/TinyLogger-Tests/TinyLoggerTest.class.st b/src/TinyLogger-Tests/TinyLoggerTest.class.st index f02872f..9bf0f88 100644 --- a/src/TinyLogger-Tests/TinyLoggerTest.class.st +++ b/src/TinyLogger-Tests/TinyLoggerTest.class.st @@ -226,6 +226,17 @@ TinyLoggerTest >> testExecuteRecordedAsBlock2 [ ifTrue: [ log ensureDelete ] ] ] +{ #category : 'tests' } +TinyLoggerTest >> testExecuteRecordedAsBlockStillExecuteUserBlockIfNoLoggerIsPresent [ + + | log bool | + bool := false. + log := 'testFileForTinyLogger.log' asFileReference. + [ + logger execute: [ bool := true ] recordedAs: [ 'this is a test' ]. + self assert: bool ] ensure: [ (log isNotNil and: [ log exists ]) ifTrue: [ log ensureDelete ] ] +] + { #category : 'tests' } TinyLoggerTest >> testExecuteRecordedAsKeepRightIndentation [