From 12cb862cf09bbd30bd77feeef546bc09658dd228 Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Mon, 2 Dec 2024 16:44:18 -0500 Subject: [PATCH] Add CRLF formatter test --- .gitattributes | 3 ++ .../tests/specs/r/crlf/string_value.R | 2 ++ .../tests/specs/r/crlf/string_value.R.snap | 30 +++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 crates/air_r_formatter/tests/specs/r/crlf/string_value.R create mode 100644 crates/air_r_formatter/tests/specs/r/crlf/string_value.R.snap diff --git a/.gitattributes b/.gitattributes index 6313b56c..922c1a66 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,4 @@ * text=auto eol=lf + +# Windows specific test files where we need CRLF endings +crates/air_r_formatter/tests/specs/r/crlf/*.R text eol=crlf diff --git a/crates/air_r_formatter/tests/specs/r/crlf/string_value.R b/crates/air_r_formatter/tests/specs/r/crlf/string_value.R new file mode 100644 index 00000000..198f3f21 --- /dev/null +++ b/crates/air_r_formatter/tests/specs/r/crlf/string_value.R @@ -0,0 +1,2 @@ +"multiline +string" diff --git a/crates/air_r_formatter/tests/specs/r/crlf/string_value.R.snap b/crates/air_r_formatter/tests/specs/r/crlf/string_value.R.snap new file mode 100644 index 00000000..ebcdfbc1 --- /dev/null +++ b/crates/air_r_formatter/tests/specs/r/crlf/string_value.R.snap @@ -0,0 +1,30 @@ +--- +source: crates/air_formatter_test/src/snapshot_builder.rs +info: r/crlf/string_value.R +--- +# Input + +```R +"multiline +string" + +``` + + +============================= + +# Outputs + +## Output 1 + +----- +Indent style: Tab +Indent width: 2 +Line ending: LF +Line width: 80 +----- + +```R +"multiline +string" +```