Skip to content

Commit c743b1c

Browse files
authored
Merge pull request #46 from meatball133/1.1.1
[1.1.1]: Various fixes
2 parents 0994549 + ebb6cb2 commit c743b1c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 1.1.1
2+
3+
- Fixed an issue causing help functions to be marked as test cases
4+
- Made the output when writting a compile error shorter
5+
16
# 1.1.0
27

38
- The test runner will run one test at a time, this is to be able to give a better error message when a test fails.

src/testrunner/Sources/TestRunner/main.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class TestRunner{
3333
let bodyCheck = node.body
3434
if bodyCheck != nil{
3535
let name: String = String(describing: node.identifier)
36+
guard name.hasPrefix("test") else { return SyntaxVisitorContinueKind.visitChildren }
3637
var body: String = String(describing: bodyCheck!).trimmingCharacters(in: charactersToRemove)
3738
body = String(body[body.index(after: body.startIndex)..<body.index(before: body.endIndex)]).trimmingCharacters(in: charactersToRemove)
3839
var bodyList = body.components(separatedBy: "\n")
@@ -247,7 +248,7 @@ class TestRunner{
247248
let message = something.components(separatedBy: "\n")[1...]
248249
var start = 0
249250
for (rowIdx, row) in message.enumerated(){
250-
if row.contains("CompileError.swift:") || row.contains("\(camelCase(slug: slug))Tests.swift:"){
251+
if row.contains("CompileError.swift:") || row.contains("\(camelCase(slug: slug))Tests.swift:") || row.contains("\(camelCase(slug: slug)).swift:") {
251252
start = rowIdx + 1
252253
break
253254
}

0 commit comments

Comments
 (0)