diff --git a/test/lib/xdotool/position_parse_test.rb b/test/lib/xdotool/position_parse_test.rb new file mode 100644 index 0000000..28a19e3 --- /dev/null +++ b/test/lib/xdotool/position_parse_test.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require 'minitest/autorun' +require_relative '../../test_helper' + +class PositionParserTest < Minitest::Test + def setup + @position = 'x:761 y:1051 screen:0 window:20971523' + @expect_result = { x: 761, y: 1051 } + end + + def test_version + assert_equal @expect_result, Xdotool::PositionParser.parse(@position) + end +end diff --git a/test/test_helper.rb b/test/test_helper.rb index 1f7939d..9c21673 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,3 +2,4 @@ require_relative '../lib/boaw' require_relative '../lib/boaw/version' +require_relative '../lib/xdotool/position_parser'