We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b80c354 commit 6db3f38Copy full SHA for 6db3f38
1 file changed
spec/unit/wrap/wrap_spec.rb
@@ -186,6 +186,15 @@
186
].join("\n"))
187
end
188
189
+ it "applies stacked ANSI colors after wrapping" do
190
+ text = "aaaa \e[31mbbbb \e[32mcc"
191
+ expect(Strings::Wrap.wrap(text, 5)).to eq([
192
+ "aaaa ",
193
+ "\e[31mbbbb \e[0m",
194
+ "\e[31m\e[32mcc\e[0m\e[0m"
195
+ ].join("\n"))
196
+ end
197
+
198
it "applies ANSI codes when below wrap width" do
199
str = "\e[32mone\e[0m\e[33mtwo\e[0m"
200
0 commit comments