Sha256: 4f6f626801f8451383830e132a05330bbf25c3e7919ed11a916110b39ddfce65

Contents?: true

Size: 987 Bytes

Versions: 1

Compression:

Stored size: 987 Bytes

Contents

require File.join(File.dirname(__FILE__), "..", "..", "helper")

module Blundersaur
  module Keyboards
    class TestQwerty < Test::Unit::TestCase
      def test_keys_near
        expected = {
          ?q => [?w],
          ?w => [?q, ?e],
          ?e => [?w, ?r],
          ?r => [?e, ?t],
          ?t => [?r, ?y],
          ?y => [?t, ?u],
          ?u => [?y, ?i],
          ?i => [?u, ?o],
          ?o => [?i, ?p],
          ?p => [?o],
          ?a => [?s],
          ?s => [?a, ?d],
          ?d => [?s, ?f],
          ?f => [?d, ?g],
          ?g => [?f, ?h],
          ?h => [?g, ?j],
          ?j => [?h, ?k],
          ?k => [?j, ?l],
          ?l => [?k],
          ?z => [?x],
          ?x => [?z, ?c],
          ?c => [?x, ?v],
          ?v => [?c, ?b],
          ?b => [?v, ?n],
          ?n => [?b, ?m],
          ?m => [?n]
        }
        expected.each_pair do |char, set|
          assert_equal set, Qwerty.keys_near(char)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blundersaur-0.0.0 test/blundersaur/keyboards/test_qwerty.rb