diff --git a/bin/test b/bin/test new file mode 100755 index 0000000..a5ba02b --- /dev/null +++ b/bin/test @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +go test github.com/amyboyd/editorconfig-cli/editorconfig $* diff --git a/editorconfig/tests/.editorconfig b/editorconfig/tests/.editorconfig new file mode 100644 index 0000000..7e9d9b5 --- /dev/null +++ b/editorconfig/tests/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_size = 4 +indent_style = spaces +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[keep-trailing-spaces] +trim_trailing_whitespace = false diff --git a/editorconfig/tests/a/b/c/.editorconfig b/editorconfig/tests/a/b/c/.editorconfig new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/editorconfig/tests/a/b/c/.editorconfig @@ -0,0 +1 @@ + diff --git a/editorconfig/tests/a/b/c/d/file.go b/editorconfig/tests/a/b/c/d/file.go new file mode 100644 index 0000000..5d2e56a --- /dev/null +++ b/editorconfig/tests/a/b/c/d/file.go @@ -0,0 +1,2 @@ +abc + def diff --git a/editorconfig/tests/a/b/c/d/file.java b/editorconfig/tests/a/b/c/d/file.java new file mode 100644 index 0000000..5d2e56a --- /dev/null +++ b/editorconfig/tests/a/b/c/d/file.java @@ -0,0 +1,2 @@ +abc + def diff --git a/editorconfig/tests/a/b/c/d/file.php b/editorconfig/tests/a/b/c/d/file.php new file mode 100644 index 0000000..5d2e56a --- /dev/null +++ b/editorconfig/tests/a/b/c/d/file.php @@ -0,0 +1,2 @@ +abc + def diff --git a/editorconfig/tests/a/b/c/d/keep-trailing-spaces.txt b/editorconfig/tests/a/b/c/d/keep-trailing-spaces.txt new file mode 100644 index 0000000..355abe2 --- /dev/null +++ b/editorconfig/tests/a/b/c/d/keep-trailing-spaces.txt @@ -0,0 +1,2 @@ + + asd diff --git a/editorconfig/tests/a/b/c/file.java b/editorconfig/tests/a/b/c/file.java new file mode 100644 index 0000000..5d2e56a --- /dev/null +++ b/editorconfig/tests/a/b/c/file.java @@ -0,0 +1,2 @@ +abc + def diff --git a/editorconfig/tests/a/b/file.go b/editorconfig/tests/a/b/file.go new file mode 100644 index 0000000..5d2e56a --- /dev/null +++ b/editorconfig/tests/a/b/file.go @@ -0,0 +1,2 @@ +abc + def diff --git a/editorconfig/tests/a/b/file.java b/editorconfig/tests/a/b/file.java new file mode 100644 index 0000000..20dec90 --- /dev/null +++ b/editorconfig/tests/a/b/file.java @@ -0,0 +1,2 @@ +abc + def \ No newline at end of file diff --git a/editorconfig/tests/a/b/has-root-config/.editorconfig b/editorconfig/tests/a/b/has-root-config/.editorconfig new file mode 100644 index 0000000..619fe34 --- /dev/null +++ b/editorconfig/tests/a/b/has-root-config/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +indent_style = spaces diff --git a/editorconfig/tests/a/b/has-root-config/file.java b/editorconfig/tests/a/b/has-root-config/file.java new file mode 100644 index 0000000..7d6971b --- /dev/null +++ b/editorconfig/tests/a/b/has-root-config/file.java @@ -0,0 +1,3 @@ +abc + def + indented 6 spaces but this should not be an error