1 2#!/usr/bin/env ruby 3# 4 5require "minitest" 6require "./xdo_test_helper" 7 8class XdotoolCommandWindowMapTests < MiniTest::Test 9 include XdoTestHelper 10 11 def test_succeeds_with_valid_window 12 xdotool_ok "windowmap #{@wid}" 13 end # def test_succeeds_with_valid_window 14 15 def test_expected_failures 16 xdotool_fail "windowmap" 17 xdotool_fail "windowmap %1" 18 xdotool_fail "windowmap %@" 19 xdotool_fail "windowmap 2" # test invalid window 20 end # def test_fails_without_a_window 21 22 def test_chaining 23 xdotool_ok "windowfocus --sync #{@wid}" 24 xdotool_ok "getwindowfocus -f windowmap " 25 xdotool_ok "getwindowfocus -f windowmap %1" 26 xdotool_ok "getwindowfocus -f windowmap %@" 27 end # def test_chaining 28end # class XdotoolCommandWindowMapTests 29