Skip to content

Commit 3234d43

Browse files
committed
Don't run the crystal formatter tests on Windows due to line ending incompatibility issues
1 parent 40593d8 commit 3234d43

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

spec/end_to_end/api_no_auth_spec.cr

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe "Lucky CLI", tags: "end_to_end" do
1010
should_run_successfully "crystal run src/lucky.cr -- init.custom test-project --api --no-auth"
1111

1212
FileUtils.cd "test-project" do
13-
should_run_successfully "crystal tool format --check spec src config"
13+
{% if !flag?(:windows) %}
14+
# Due to formatter on Windows checking different line endings, this will report changes to all crystal files
15+
# We only need to test this on 1 OS to ensure things are good
16+
should_run_successfully "crystal tool format --check spec src config"
17+
{% end %}
1418
should_run_successfully "crystal script/setup.cr"
1519
should_run_successfully "crystal build src/test_project.cr"
1620
should_run_successfully "crystal spec"

spec/end_to_end/api_with_auth_spec.cr

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe "Lucky CLI", tags: "end_to_end" do
1010
should_run_successfully "crystal run src/lucky.cr -- init.custom test-project --api"
1111

1212
FileUtils.cd "test-project" do
13-
should_run_successfully "crystal tool format --check spec src config"
13+
{% if !flag?(:windows) %}
14+
# Due to formatter on Windows checking different line endings, this will report changes to all crystal files
15+
# We only need to test this on 1 OS to ensure things are good
16+
should_run_successfully "crystal tool format --check spec src config"
17+
{% end %}
1418
should_run_successfully "crystal script/setup.cr"
1519
should_run_successfully "crystal build src/test_project.cr"
1620
should_run_successfully "crystal spec"

spec/end_to_end/browser_no_auth_spec.cr

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe "Lucky CLI", tags: "end_to_end" do
1010
should_run_successfully "crystal run src/lucky.cr -- init.custom test-project --no-auth"
1111

1212
FileUtils.cd "test-project" do
13-
should_run_successfully "crystal tool format --check spec src config"
13+
{% if !flag?(:windows) %}
14+
# Due to formatter on Windows checking different line endings, this will report changes to all crystal files
15+
# We only need to test this on 1 OS to ensure things are good
16+
should_run_successfully "crystal tool format --check spec src config"
17+
{% end %}
1418
should_run_successfully "crystal script/setup.cr"
1519
should_run_successfully "crystal build src/test_project.cr"
1620
should_run_successfully "crystal spec"

spec/end_to_end/browser_with_auth_spec.cr

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe "Lucky CLI", tags: "end_to_end" do
1010
should_run_successfully "crystal run src/lucky.cr -- init.custom test-project"
1111

1212
FileUtils.cd "test-project" do
13-
should_run_successfully "crystal tool format --check spec src config"
13+
{% if !flag?(:windows) %}
14+
# Due to formatter on Windows checking different line endings, this will report changes to all crystal files
15+
# We only need to test this on 1 OS to ensure things are good
16+
should_run_successfully "crystal tool format --check spec src config"
17+
{% end %}
1418
should_run_successfully "crystal script/setup.cr"
1519
should_run_successfully "crystal build src/test_project.cr"
1620
should_run_successfully "crystal spec"

spec/end_to_end/browser_with_security_spec.cr

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe "Lucky CLI", tags: "end_to_end" do
1010
should_run_successfully "crystal run src/lucky.cr -- init.custom test-project --with-sec-test"
1111

1212
FileUtils.cd "test-project" do
13-
should_run_successfully "crystal tool format --check spec src config"
13+
{% if !flag?(:windows) %}
14+
# Due to formatter on Windows checking different line endings, this will report changes to all crystal files
15+
# We only need to test this on 1 OS to ensure things are good
16+
should_run_successfully "crystal tool format --check spec src config"
17+
{% end %}
1418
should_run_successfully "crystal script/setup.cr"
1519
should_run_successfully "crystal build src/test_project.cr"
1620
should_run_successfully "crystal spec"

0 commit comments

Comments
 (0)