This repository has been archived by the owner on May 25, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sourcecode): add for gbk count lines support
- Loading branch information
Showing
4 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
scan_git/src/test/kotlin/com/thoughtworks/archguard/git/scanner/model/LineCounterTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.thoughtworks.archguard.git.scanner.model | ||
|
||
import org.junit.jupiter.api.Assertions.* | ||
import org.junit.jupiter.api.Test | ||
import java.nio.file.Paths | ||
|
||
internal class LineCounterTest { | ||
@Test | ||
internal fun testForGbkFile() { | ||
val resource = this.javaClass.classLoader.getResource("gbkfiles/hello.go")!! | ||
val path = Paths.get(resource.toURI()).toFile().absolutePath | ||
|
||
assertEquals(9, LineCounter.byPath(path)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters