aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_prettyprint.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-05 13:27:48 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-05 13:27:48 +0000
commit805c20a8e59315f15dbb22ac1518de6a27385039 (patch)
tree81b4d726b3ee9e06afa2f0781dfbad263c62dbff /test/test_prettyprint.rb
parentfab171e541f7b7373efe386ae956d7a44ce4e330 (diff)
downloadruby-805c20a8e59315f15dbb22ac1518de6a27385039.tar.gz
* lib/pp.rb: Use frozen_string_literal: true.
* lib/prettyprint.rb: Ditto. * lib/resolv.rb: Ditto. * lib/tmpdir.rb: Ditto. * test/test_pp.rb: Ditto. * test/test_prettyprint.rb: Ditto. * tool/transcode-tblgen.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_prettyprint.rb')
-rw-r--r--test/test_prettyprint.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/test_prettyprint.rb b/test/test_prettyprint.rb
index 1d6b75a569..0d087b4a78 100644
--- a/test/test_prettyprint.rb
+++ b/test/test_prettyprint.rb
@@ -1,3 +1,5 @@
+# -*- frozen_string_literal: true -*-
+
require 'prettyprint'
require 'test/unit'
@@ -14,7 +16,7 @@ class WadlerExample < Test::Unit::TestCase # :nodoc:
end
def hello(width)
- PrettyPrint.format('', width) {|hello|
+ PrettyPrint.format(''.dup, width) {|hello|
hello.group {
hello.group {
hello.group {
@@ -81,7 +83,7 @@ End
end
def tree(width)
- PrettyPrint.format('', width) {|q| @tree.show(q)}
+ PrettyPrint.format(''.dup, width) {|q| @tree.show(q)}
end
def test_tree_00_19
@@ -126,7 +128,7 @@ End
end
def tree_alt(width)
- PrettyPrint.format('', width) {|q| @tree.altshow(q)}
+ PrettyPrint.format(''.dup, width) {|q| @tree.altshow(q)}
end
def test_tree_alt_00_18
@@ -242,7 +244,7 @@ end
class StrictPrettyExample < Test::Unit::TestCase # :nodoc:
def prog(width)
- PrettyPrint.format('', width) {|q|
+ PrettyPrint.format(''.dup, width) {|q|
q.group {
q.group {q.nest(2) {
q.text "if"; q.breakable;
@@ -387,7 +389,7 @@ end
class TailGroup < Test::Unit::TestCase # :nodoc:
def test_1
- out = PrettyPrint.format('', 10) {|q|
+ out = PrettyPrint.format(''.dup, 10) {|q|
q.group {
q.group {
q.text "abc"
@@ -426,7 +428,7 @@ end
class Fill < Test::Unit::TestCase # :nodoc:
def format(width)
- PrettyPrint.format('', width) {|q|
+ PrettyPrint.format(''.dup, width) {|q|
q.group {
q.text 'abc'
q.fill_breakable