Skip to content

Commit

Permalink
add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Dec 30, 2023
1 parent ff79956 commit 04efc44
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/formatter/formatter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func TestFormat(t *testing.T) {
formatted := Eval(parsed, env)
got := strings.TrimRight(formatted.Render(opts), "\n") + "\n"

b, err = os.ReadFile(fname[:len(fname)-4] + ".out")
b, err = os.ReadFile(fname[:len(fname)-4] + ".golden")
if err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 4 additions & 0 deletions internal/formatter/testdata/001.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SELECT
*
FROM
TABLE
13 changes: 13 additions & 0 deletions internal/formatter/testdata/002.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- hoge --
SELECT
x/*x*/,
/*x*/y
FROM
zzz;
-- zzzz
SELECT
*
FROM
yyy;
-- yyyy
-- hage --
28 changes: 28 additions & 0 deletions internal/formatter/testdata/003.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-- hoge --
SELECT
x/*x*/,
/*x*/y
FROM
zzz;
-- zzzz
SELECT
*
FROM
yyy;
-- yyyy
-- hage --
SELECT
ap.autograph_purchase_id AS "id",
ap.order_number AS "order",
ap.product_price AS "productPrice",
i.name AS "influencerName",
p.name AS "productName",
u.email AS "email"
FROM
autograph_purchaseASap innser
JOIN influencer AS i
ON autograph_purchase.influencer_id = influencer.influencer_id
LEFT JOIN product AS p
ON product.product_id = autograph_purchase.product_id
LEFT JOIN USER AS u
ON USER.user_id = autograph_purchase.user_id

0 comments on commit 04efc44

Please sign in to comment.