Sha256: 39db17b7dfbb6272fab1fbc2274e15448d91bf2a83f12e69a6e4cc5cd67d3a94
Contents?: true
Size: 1.46 KB
Versions: 9
Compression:
Stored size: 1.46 KB
Contents
require "minitest/autorun" require "readline" class TestHistory < Minitest::Test # RbReadline::HISTORY_WORD_DELIMITERS.inspect # => " \t\n;&()|<>" # RbReadline::HISTORY_QUOTE_CHARACTERS = "\"'`" # => "\"'`" def test_history_arg_extract assert_raises(RuntimeError) { RbReadline.history_arg_extract("!", "$", "one two three") } assert_raises(RuntimeError) { RbReadline.history_arg_extract("$", "!", "one two three") } assert_equal "one", RbReadline.history_arg_extract("$", "$", "one") assert_equal "three", RbReadline.history_arg_extract("$", "$", "one two three") assert_equal "two\\ three", RbReadline.history_arg_extract("$", "$", "one two\\ three") assert_equal "three", RbReadline.history_arg_extract("$", "$", "one two;three") assert_equal "two\\;three", RbReadline.history_arg_extract("$", "$", "one two\\;three") assert_equal "'two three'", RbReadline.history_arg_extract("$", "$", "one 'two three'") assert_equal "`two three`", RbReadline.history_arg_extract("$", "$", "one `two three`") assert_equal "three\\'", RbReadline.history_arg_extract("$", "$", "one \\'two three\\'") assert_equal "`one`", RbReadline.history_arg_extract("$", "$", "`one`") assert_equal "three'", RbReadline.history_arg_extract("$", "$", "one two three'") assert_equal "three", RbReadline.history_arg_extract("$", "$", "one two' three") assert_equal "'two three '", RbReadline.history_arg_extract("$", "$", "one 'two three '") end end
Version data entries
9 entries across 9 versions & 4 rubygems