Tyler-Keith-Thompson / CucumberSwift

A lightweight swift Cucumber implementation
https://tyler-keith-thompson.github.io/CucumberSwift/documentation/cucumberswift/
MIT License
74 stars 19 forks source link

Some tests are not passing because generated code is localised. #77

Closed Hsilgos closed 1 year ago

Hsilgos commented 1 year ago

I run unit tests locally with Cyrillic language on my laptop and several tests fail:

  Assertions: Assertion Failure at StepGenerationTests.swift:333: XCTAssertEqual failed: ("Given("^I have some data table that is not implemented and some string \"(.*?)\" and some other string \"(.*?)\"$") { matches, step in
    let string = matches[1]
    let stringДва = matches[2]
    let dataTable = step.dataTable
}
Given("^a DocString with the number (\\d+) and another number (\\d+)$") { matches, step in
    let integer = matches[1]
    let integerДва = matches[2]
    let docString = step.docString
}") is not equal to ("Given("^I have some data table that is not implemented and some string \"(.*?)\" and some other string \"(.*?)\"$") { matches, step in
    let string = matches[1]
    let stringTwo = matches[2]
    let dataTable = step.dataTable
}
Given("^a DocString with the number (\\d+) and another number (\\d+)$") { matches, step in
    let integer = matches[1]
    let integerTwo = matches[2]
    let docString = step.docString
}")
  File: StepGenerationTests.swift:333

This happens because of call to NumberFormatter.localizedString here