diff options
| author | Bartek Iwańczuk <biwanczuk@gmail.com> | 2024-11-20 00:18:57 +0100 |
|---|---|---|
| committer | Bartek Iwańczuk <biwanczuk@gmail.com> | 2024-11-20 00:18:57 +0100 |
| commit | 21bd818f1ee531a49c46213417774fbc18a8b562 (patch) | |
| tree | ea32c744f0fd1932f7a505892e43846a73823fbd /tests/testdata | |
| parent | 6356329b37282178701c0064a4a2cd04286a51e7 (diff) | |
| parent | 46b6037644c761369e689704f8e7b857959da155 (diff) | |
Merge branch 'main' into haturatu/main
Diffstat (limited to 'tests/testdata')
| -rw-r--r-- | tests/testdata/fmt/badly_formatted.md | 12 | ||||
| -rw-r--r-- | tests/testdata/fmt/badly_formatted.sql | 21 | ||||
| -rw-r--r-- | tests/testdata/fmt/badly_formatted_fixed.md | 15 | ||||
| -rw-r--r-- | tests/testdata/fmt/badly_formatted_fixed.sql | 22 |
4 files changed, 70 insertions, 0 deletions
diff --git a/tests/testdata/fmt/badly_formatted.md b/tests/testdata/fmt/badly_formatted.md index 642918cea..be90ff845 100644 --- a/tests/testdata/fmt/badly_formatted.md +++ b/tests/testdata/fmt/badly_formatted.md @@ -63,3 +63,15 @@ function foo(): number { let a:number </script> ``` + + +```sql + seLect * , biz, buz +from baz; +``` + +```sql +-- deno-fmt-ignore-file + seLect * , biz, buz +from baz; +``` diff --git a/tests/testdata/fmt/badly_formatted.sql b/tests/testdata/fmt/badly_formatted.sql new file mode 100644 index 000000000..8b4cb978f --- /dev/null +++ b/tests/testdata/fmt/badly_formatted.sql @@ -0,0 +1,21 @@ +select * from foo; +update foo set a = 'b'Where id = 'biz'; + + + create table foo(id text not null +bar text, + biz int, + buz number NOT NULL +); + +INSERT + into + user_data + (first_name, +last_name, address, phone, email) +VALUES + ('foo', 'bar', + 'biz', 1, 'bix'); + + + diff --git a/tests/testdata/fmt/badly_formatted_fixed.md b/tests/testdata/fmt/badly_formatted_fixed.md index 21176742b..7a482e058 100644 --- a/tests/testdata/fmt/badly_formatted_fixed.md +++ b/tests/testdata/fmt/badly_formatted_fixed.md @@ -56,3 +56,18 @@ function foo(): number { let a: number; </script> ``` + +```sql +SELECT + *, + biz, + buz +FROM + baz; +``` + +```sql +-- deno-fmt-ignore-file + seLect * , biz, buz +from baz; +``` diff --git a/tests/testdata/fmt/badly_formatted_fixed.sql b/tests/testdata/fmt/badly_formatted_fixed.sql new file mode 100644 index 000000000..d50c61921 --- /dev/null +++ b/tests/testdata/fmt/badly_formatted_fixed.sql @@ -0,0 +1,22 @@ +SELECT + * +FROM + foo; + +UPDATE + foo +SET + a = 'b' +WHERE + id = 'biz'; + +CREATE TABLE foo( + id text NOT NULL bar text, + biz int, + buz number NOT NULL +); + +INSERT INTO + user_data (first_name, last_name, address, phone, email) +VALUES + ('foo', 'bar', 'biz', 1, 'bix'); |
