Skip to content

Commit

Permalink
🔧 move timestamp regex validation from bell to hyperspace
Browse files Browse the repository at this point in the history
  • Loading branch information
mreyes committed Jun 26, 2024
1 parent 263277d commit 24c7d68
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions source/Bell-SUnit/LoggingAsserter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@ LoggingAsserter >> assertLogRecordsMatch: expectedLogEntries [
{ #category : #asserting }
LoggingAsserter >> assertLogRecordsMatchRegexes: regexExpressions [

memoryLogger recordings with: regexExpressions do: [ :record :regexExpression |
| regexWithTimestamp |

regexWithTimestamp := '\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}(\.\d+)?(\+|-)(\d+\:\d+) <1s>' expandMacrosWith:
regexExpression.
testCase assert: ( record printString matchesRegex: regexWithTimestamp )
description:
( '<1s> does not match <2s>' expandMacrosWith: record printString with: regexWithTimestamp )
]
memoryLogger recordings with: regexExpressions do: [ :record :regexExpression |
testCase
assert: ( record printString matchesRegex: regexExpression )
description:
( '<1s> does not match <2s>' expandMacrosWith: record printString with: regexExpression )
]
]

{ #category : #initialization }
Expand Down

0 comments on commit 24c7d68

Please sign in to comment.