Skip to content

Commit

Permalink
Disable test case related on Windows OS file system
Browse files Browse the repository at this point in the history
  • Loading branch information
ao0000 committed May 1, 2023
1 parent 504209e commit e359879
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package com.pinterest.ktlint.ruleset.standard.rules

import com.pinterest.ktlint.test.KtLintAssertThat.Companion.assertThatRule
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.condition.DisabledOnOs
import org.junit.jupiter.api.condition.OS

class NoEmptyFileRuleTest {
private val noEmptyFileRuleAssertThat = assertThatRule { NoEmptyFileRule() }
Expand All @@ -20,6 +22,7 @@ class NoEmptyFileRuleTest {
.hasNoLintViolations()
}

@DisabledOnOs(OS.WINDOWS)
@Test
fun `Given an empty kotlin file then do a return lint error`() {
val code = EMPTY_FILE
Expand All @@ -28,6 +31,7 @@ class NoEmptyFileRuleTest {
.hasLintViolationWithoutAutoCorrect(1, 1, "File `/project/some/path/Tmp.kt` should not be empty")
}

@DisabledOnOs(OS.WINDOWS)
@Test
fun `Given an empty kotlin script file then do a return lint error`() {
val code = EMPTY_FILE
Expand All @@ -36,6 +40,7 @@ class NoEmptyFileRuleTest {
.hasLintViolationWithoutAutoCorrect(1, 1, "File `/project/some/path/Tmp.kts` should not be empty")
}

@DisabledOnOs(OS.WINDOWS)
@Test
fun `Given only package statement in kotlin file then do a return lint error`() {
val code =
Expand All @@ -48,6 +53,7 @@ class NoEmptyFileRuleTest {
.hasLintViolationWithoutAutoCorrect(1, 1, "File `/project/some/path/Tmp.kt` should not be empty")
}

@DisabledOnOs(OS.WINDOWS)
@Test
fun `Given only import statement in kotlin file then do a return lint error`() {
val code =
Expand All @@ -59,6 +65,7 @@ class NoEmptyFileRuleTest {
.hasLintViolationWithoutAutoCorrect(1, 1, "File `/project/some/path/Tmp.kt` should not be empty")
}

@DisabledOnOs(OS.WINDOWS)
@Test
fun `Given only package and import statements in kotlin file then do a return lint error`() {
val code =
Expand Down

0 comments on commit e359879

Please sign in to comment.