aboutsummaryrefslogtreecommitdiff
path: root/Tests/WmapParserTests/InertiaParserTests.swift
blob: 92d986869940ccfa637e50e9a46da75ab287f8e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import Testing

@testable import WmapParser

@Test func shouldParseInertia() {
  let source = "[Inertia] Print Media"
  let result = parse(source)
  #expect(result.inertias.count == 1)
  #expect(result.inertias.first?.component == "Print Media")
}

@Test func shouldHandleCaseInsensitiveInertiaKeyword() {
  let source = "[inertia] Yes"
  let result = parse(source)
  #expect(result.inertias.count == 1)
  #expect(result.inertias.first?.component == "Yes")
}

@Test func shouldPreserveCaseInInertiaComponentLabel() {
  let source = "[INERTIA] SpOnGeBoB"
  let result = parse(source)
  #expect(result.inertias.count == 1)
  #expect(result.inertias.first?.component == "SpOnGeBoB")
}