File: subtle_init.rb

package info (click to toggle)
subtle 0.11.3224-xi-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,132 kB
  • sloc: ansic: 14,702; ruby: 3,101; makefile: 17; sh: 8
file content (41 lines) | stat: -rw-r--r-- 966 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
# @package test
#
# @file Test Subtlext::Subtle functions
# @author Christoph Kappel <unexist@subforge.org>
# @version $Id: test/contexts/subtle_init.rb,v 3131 2011/11/15 20:43:06 unexist $
#
# This program can be distributed under the terms of the GNU GPLv2.
# See the file COPYING for details.
#

context 'Subtle - Init' do
  COLORS_COUNT = 48

  asserts 'Check running' do # {{{
    Subtlext::Subtle.running?
  end # }}}

  asserts 'Check colors' do # {{{
    Subtlext::Subtle.colors.is_a?(Hash) and
      COLORS_COUNT == Subtlext::Subtle.colors.size
  end # }}}

  asserts 'Check font' do # {{{
    '-*-*-*-*-*-*-14-*-*-*-*-*-*-*' == Subtlext::Subtle.font
  end # }}}

  asserts 'Check spawn' do # {{{
    if (xterm = find_executable0('xterm')).nil?
      raise 'xterm not found in path'
    else
      Subtlext::Subtle.spawn("#{xterm} -display :10")
    end

    sleep 1

    1 == Subtlext::Client.all.size
  end # }}}
end

# vim:ts=2:bs=2:sw=2:et:fdm=marker