build: add windows host for build tests

This commit is contained in:
Skylot 2023-08-01 18:44:53 +01:00
parent 95db98e574
commit 868e99e0b5
No known key found for this signature in database
GPG Key ID: 1E23F5B52567AA39
5 changed files with 117 additions and 95 deletions

12
.gitattributes vendored Normal file
View File

@ -0,0 +1,12 @@
* text=auto eol=lf
*.java text eol=lf diff=java
*.kt text eol=lf diff=kotlin
*.kts text eol=lf diff=kotlin
gradlew text eol=lf
*.bat text eol=crlf
*.png binary
*.jar binary

View File

@ -8,7 +8,11 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

View File

@ -1,3 +1,5 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
plugins {
java
checkstyle
@ -46,6 +48,10 @@ tasks {
test {
useJUnitPlatform()
maxParallelForks = Runtime.getRuntime().availableProcessors()
testLogging.showExceptions = true
testLogging {
showExceptions = true
exceptionFormat = TestExceptionFormat.FULL
showCauses = true
}
}
}

View File

@ -29,7 +29,7 @@ class ScriptServicesTest {
val script = getSampleScript(name)
val idx = script.indexOf("jadx.log.info")
val completePos = idx + 7 // jadx.lo| <- complete 'log'
val curScript = script.removeRange(completePos, script.indexOf("\n", idx))
val curScript = script.substring(0, completePos)
val result = ScriptServices().complete(name, curScript, completePos)
println(result)