"Fossies" - the Fresh Open Source Software Archive

Member "vagrant-2.2.14/test/unit/vagrant/util/ansi_escape_code_remover_test.rb" (20 Nov 2020, 368 Bytes) of package /linux/misc/vagrant-2.2.14.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ruby source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 require File.expand_path("../../../base", __FILE__)
    3 require "vagrant/util/ansi_escape_code_remover"
    5 describe Vagrant::Util::ANSIEscapeCodeRemover do
    6   let(:klass) do
    7     Class.new do
    8       extend Vagrant::Util::ANSIEscapeCodeRemover
    9     end
   10   end
   12   it "should remove ANSI escape codes" do
   13     expect(klass.remove_ansi_escape_codes("\e[Hyo")).to eq("yo")
   14   end
   15 end