From 27604359d4842d56b020b47b6ba97a5d40b29e1e Mon Sep 17 00:00:00 2001 From: Nate Clark Date: Tue, 10 Apr 2018 18:30:12 -0500 Subject: [PATCH] Add test for buggy ruby method newline Currently, inserting a newline after a ruby method will incorrectly cause the following line to repeat the method header. This commit adds a test case to illustrate the bug. --- test/indent/ruby/method-definition-shouldnt-duplicate/cmd | 1 + test/indent/ruby/method-definition-shouldnt-duplicate/in | 3 +++ test/indent/ruby/method-definition-shouldnt-duplicate/out | 5 +++++ test/indent/ruby/method-definition-shouldnt-duplicate/rc | 3 +++ 4 files changed, 12 insertions(+) create mode 100644 test/indent/ruby/method-definition-shouldnt-duplicate/cmd create mode 100644 test/indent/ruby/method-definition-shouldnt-duplicate/in create mode 100644 test/indent/ruby/method-definition-shouldnt-duplicate/out create mode 100644 test/indent/ruby/method-definition-shouldnt-duplicate/rc diff --git a/test/indent/ruby/method-definition-shouldnt-duplicate/cmd b/test/indent/ruby/method-definition-shouldnt-duplicate/cmd new file mode 100644 index 000000000..760030305 --- /dev/null +++ b/test/indent/ruby/method-definition-shouldnt-duplicate/cmd @@ -0,0 +1 @@ +c diff --git a/test/indent/ruby/method-definition-shouldnt-duplicate/in b/test/indent/ruby/method-definition-shouldnt-duplicate/in new file mode 100644 index 000000000..8a5a3925b --- /dev/null +++ b/test/indent/ruby/method-definition-shouldnt-duplicate/in @@ -0,0 +1,3 @@ +class Test + def test%( ) +end diff --git a/test/indent/ruby/method-definition-shouldnt-duplicate/out b/test/indent/ruby/method-definition-shouldnt-duplicate/out new file mode 100644 index 000000000..895bd63ec --- /dev/null +++ b/test/indent/ruby/method-definition-shouldnt-duplicate/out @@ -0,0 +1,5 @@ +class Test + def test + + end +end diff --git a/test/indent/ruby/method-definition-shouldnt-duplicate/rc b/test/indent/ruby/method-definition-shouldnt-duplicate/rc new file mode 100644 index 000000000..d4fadeea0 --- /dev/null +++ b/test/indent/ruby/method-definition-shouldnt-duplicate/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/base/ruby.kak" +set buffer filetype ruby