test(languages): tier-1 language comment-removal goldens
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
(ns app) ; line
|
||||
(def x 1)
|
||||
@@ -0,0 +1,2 @@
|
||||
(ns app)
|
||||
(def x 1)
|
||||
@@ -0,0 +1,4 @@
|
||||
defmodule M do
|
||||
# line
|
||||
def f, do: 1
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
defmodule M do
|
||||
def f, do: 1
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
type Q {
|
||||
# line
|
||||
f: Int
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
type Q {
|
||||
f: Int
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
main = putStrLn "x" -- line
|
||||
{- block
|
||||
cmt -}
|
||||
f = 1
|
||||
@@ -0,0 +1,2 @@
|
||||
main = putStrLn "x"
|
||||
f = 1
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
# line
|
||||
x = 1;
|
||||
/* block
|
||||
cmt */
|
||||
y = 2;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
x = 1;
|
||||
y = 2;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
let x = 1
|
||||
(* block
|
||||
cmt *)
|
||||
let y = 2
|
||||
@@ -0,0 +1,2 @@
|
||||
let x = 1
|
||||
let y = 2
|
||||
@@ -0,0 +1,7 @@
|
||||
syntax = "proto3";
|
||||
// line
|
||||
message M {
|
||||
/* block
|
||||
cmt */
|
||||
int32 x = 1;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
syntax = "proto3";
|
||||
message M {
|
||||
int32 x = 1;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
contract C {
|
||||
// line
|
||||
/* block
|
||||
cmt */
|
||||
uint x;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
contract C {
|
||||
uint x;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
resource "a" "b" { # h
|
||||
x = 1 // s
|
||||
/* block
|
||||
cmt */
|
||||
y = 2
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
resource "a" "b" {
|
||||
x = 1
|
||||
y = 2
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
const x = 1; // line
|
||||
// c2
|
||||
pub fn main() void {}
|
||||
@@ -0,0 +1,2 @@
|
||||
const x = 1;
|
||||
pub fn main() void {}
|
||||
@@ -0,0 +1,23 @@
|
||||
package processor
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestTier1Languages(t *testing.T) {
|
||||
cases := []multilineCase{
|
||||
{name: "terraform", file: "tier1_terraform.tf"},
|
||||
{name: "solidity", file: "tier1_solidity.sol"},
|
||||
{name: "zig", file: "tier1_zig.zig"},
|
||||
{name: "elixir", file: "tier1_elixir.ex"},
|
||||
{name: "nix", file: "tier1_nix.nix"},
|
||||
{name: "protobuf", file: "tier1_protobuf.proto"},
|
||||
{name: "graphql", file: "tier1_graphql.graphql"},
|
||||
{name: "ocaml", file: "tier1_ocaml.ml"},
|
||||
{name: "haskell", file: "tier1_haskell.hs"},
|
||||
{name: "clojure", file: "tier1_clojure.clj"},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
runMultilineCase(t, tc)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user