aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTomasz Hołubowicz <45176912+alternateved@users.noreply.github.com>2023-03-29 23:35:02 +0200
committerGitHub <noreply@github.com>2023-03-29 14:35:02 -0700
commit23c8b7d1ca3d855b38b8fe8bee760fa1234b6143 (patch)
tree8c3a2dc708efa7f54ec3e635289ea9513122d5e2 /test
parentedec1e61c81da9e20575cf29a8875c56621e2edb (diff)
Add purs-tidy formatter (#182)
Hello! I would like to add support for `purs-tidy` - PureScript formatter. Best wishes alternateved
Diffstat (limited to 'test')
-rw-r--r--test/formatters/installers/purs-tidy.bash1
-rw-r--r--test/formatters/samplecode/purs-tidy/in.purs7
-rw-r--r--test/formatters/samplecode/purs-tidy/out.purs10
3 files changed, 18 insertions, 0 deletions
diff --git a/test/formatters/installers/purs-tidy.bash b/test/formatters/installers/purs-tidy.bash
new file mode 100644
index 0000000..b6e2bae
--- /dev/null
+++ b/test/formatters/installers/purs-tidy.bash
@@ -0,0 +1 @@
+npm install -g purs-tidy
diff --git a/test/formatters/samplecode/purs-tidy/in.purs b/test/formatters/samplecode/purs-tidy/in.purs
new file mode 100644
index 0000000..e112292
--- /dev/null
+++ b/test/formatters/samplecode/purs-tidy/in.purs
@@ -0,0 +1,7 @@
+module Foo where
+baz ::Array(String)
+ -> Int->Boolean->Int
+baz _ n
+ = case _ of
+ true-> 20 +1
+ false -> if n> 0 then 3-(-2)else 0
diff --git a/test/formatters/samplecode/purs-tidy/out.purs b/test/formatters/samplecode/purs-tidy/out.purs
new file mode 100644
index 0000000..b149877
--- /dev/null
+++ b/test/formatters/samplecode/purs-tidy/out.purs
@@ -0,0 +1,10 @@
+module Foo where
+
+baz
+ :: Array (String)
+ -> Int
+ -> Boolean
+ -> Int
+baz _ n = case _ of
+ true -> 20 + 1
+ false -> if n > 0 then 3 - (-2) else 0