feat(m0): complete scaffold, logging and signature checks (T0.2-T0.6)
Add os.Logger categories, OSSignposter wrapper and shortHash helper; enforce exact Debug/Release/install signatures; lint tests; update M0 docs and progress.
This commit is contained in:
1 parent
374085ec2f
commit
7ca5c710ec
17 files changed
+331
-9
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import Testing
|
||||
@testable import SprachmittlerCore
|
||||
|
||||
/// T0.4: SP-2 allows short hashes in logs, never the underlying text.
|
||||
@Suite("Log redaction")
|
||||
struct LogRedactionTests {
|
||||
@Test func shortHashIsStableTwelveHexAndOpaque() {
|
||||
let hash = LogRedaction.shortHash("hello")
|
||||
#expect(hash == "2cf24dba5fb0")
|
||||
#expect(hash == LogRedaction.shortHash("hello"))
|
||||
#expect(hash.count == 12)
|
||||
#expect(hash.allSatisfy { $0.isHexDigit && !$0.isUppercase })
|
||||
#expect(hash != LogRedaction.shortHash("hello!"))
|
||||
#expect(!hash.contains("hello"))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user