-
Notifications
You must be signed in to change notification settings - Fork 0
/
comby.toml
55 lines (38 loc) · 847 Bytes
/
comby.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[describe]
match = ':[i~ +]describe ":[msg]" [:[cases]]'
rewrite = """
:[i]describe ":[msg]" $ do
:[i]:[cases]
"""
[it]
match = ':[i~ +]it :[msg] $ assertPretty :[1] :[2] :[3],'
rewrite = """
:[i]it :[msg] $ do
:[i] assertPretty
:[i] :[1]
:[i] :[2]
:[i] :[3]
"""
[assertPretty-unlines]
match = ':[i~ +]assertPretty :[parser] ( unlines :[1] ) :[2]'
rewrite = """
:[i]let nt = :[1]
:[i] ts = :[2]
:[i] in pp :[parser] (unlines nt) `shouldBe` here ts
"""
[assertPretty]
match = ':[i~ +]assertPretty :[parser] :[1] :[2]'
rewrite = """
:[i]let nt = :[1]
:[i] ts = :[2]
:[i] in pp :[parser] (unlines nt) `shouldBe` here ts
"""
[let-nt-array]
match = 'nt = ":[v]"'
rewrite = 'nt = [":[v]"]'
[let-ts-array]
match = 'ts = ":[v]"'
rewrite = 'ts = [":[v]"]'
[renameTest]
match = ':[v~^test]:[rest\n]'
rewrite = 'spec:[rest]'