aboutsummaryrefslogtreecommitdiff
path: root/test/formatters/samplecode
diff options
context:
space:
mode:
authorMohsin Kaleem <mohkale@kisara.moe>2023-04-22 11:53:13 +0100
committerGitHub <noreply@github.com>2023-04-22 11:53:13 +0100
commit95bea3371b65ff562f91a74d52cf31cd3b883f8c (patch)
treeb2675e84c703fd26c7262a5c10d0525094d9c27f /test/formatters/samplecode
parent93c11bf5e35246f0fa593850c292ecb96c6c4d00 (diff)
Add rubocop formatter (#176)
Diffstat (limited to 'test/formatters/samplecode')
l---------test/formatters/samplecode/rubocop/in.rb1
-rw-r--r--test/formatters/samplecode/rubocop/out.rb15
2 files changed, 16 insertions, 0 deletions
diff --git a/test/formatters/samplecode/rubocop/in.rb b/test/formatters/samplecode/rubocop/in.rb
new file mode 120000
index 0000000..2881c83
--- /dev/null
+++ b/test/formatters/samplecode/rubocop/in.rb
@@ -0,0 +1 @@
+../prettier-ruby/in.rb \ No newline at end of file
diff --git a/test/formatters/samplecode/rubocop/out.rb b/test/formatters/samplecode/rubocop/out.rb
new file mode 100644
index 0000000..a677a10
--- /dev/null
+++ b/test/formatters/samplecode/rubocop/out.rb
@@ -0,0 +1,15 @@
+d = [30_644_250_780, 9_003_106_878,
+ 30_636_278_846, 66_641_217_692, 4_501_790_980,
+ 67_124_603_036, 13_161_973_916, 66_606_629_920,
+ 30_642_677_916, 30_643_069_058]; a = []
+s = $*[0]
+s.each_byte do |b|
+ a << ('%036b' % d[b
+ .chr.to_i]).scan(/\d{6}/)
+end
+a.transpose.each do |a|
+ a.join.each_byte do |i|
+ print i == 49 ? ($*[1] || '#') : 32.chr
+ end
+ puts
+end