vte3 2.2.5 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,47 @@
1
+ # Copyright (C) 2014 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestPty < Test::Unit::TestCase
18
+ def setup
19
+ flag = Vte::PtyFlags::DEFAULT
20
+ @pty = Vte::Pty.new(flag)
21
+ end
22
+
23
+ def test_fd
24
+ assert_nothing_raised do
25
+ @pty.fd
26
+ end
27
+ end
28
+
29
+ def test_size
30
+ row = 80
31
+ col = 24
32
+ @pty.set_size(row, col)
33
+ assert_equal([row, col], @pty.size)
34
+ end
35
+
36
+ def test_term
37
+ term_type = "vt100"
38
+ @pty.term = term_type
39
+ assert_equal(term_type, @pty.term)
40
+ end
41
+
42
+ def test_utf8
43
+ assert_nothing_raised do
44
+ @pty.utf8 = true
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,122 @@
1
+ # Copyright (C) 2014 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestTerminalProperties < Test::Unit::TestCase
18
+ include VteTestUtils
19
+
20
+ def setup
21
+ @terminal = Vte::Terminal.new
22
+ end
23
+
24
+ def test_allow_bold
25
+ @terminal.allow_bold = false
26
+ assert_false(@terminal.allow_bold?)
27
+ end
28
+
29
+ def test_audible_bell
30
+ @terminal.audible_bell = false
31
+ assert_false(@terminal.audible_bell?)
32
+ end
33
+
34
+ def test_background_image_file
35
+ image_name = "image_file"
36
+ @terminal.background_image_file = image_name
37
+ assert_equal(image_name, @terminal.background_image_file)
38
+ end
39
+
40
+ def test_backspace_binding
41
+ bind = Vte::TerminalEraseBinding::DELETE_SEQUENCE
42
+ @terminal.backspace_binding = bind
43
+ assert_equal(bind, @terminal.backspace_binding)
44
+ end
45
+
46
+ def test_cursor_blink_mode
47
+ cursor_mode = Vte::TerminalCursorBlinkMode::ON
48
+ @terminal.cursor_blink_mode = cursor_mode
49
+ assert_equal(cursor_mode, @terminal.cursor_blink_mode)
50
+ end
51
+
52
+ def test_cursor_shape
53
+ shape = Vte::TerminalCursorShape::IBEAM
54
+ @terminal.cursor_shape = shape
55
+ assert_equal(shape, @terminal.cursor_shape)
56
+ end
57
+
58
+ def test_delete_binding
59
+ bind = Vte::TerminalEraseBinding::ASCII_DELETE
60
+ @terminal.delete_binding = bind
61
+ assert_equal(bind, @terminal.delete_binding)
62
+ end
63
+ def test_emulation
64
+ terminal_type = "vt100"
65
+ @terminal.emulation = terminal_type
66
+ assert_equal(terminal_type, @terminal.emulation)
67
+ end
68
+
69
+ def test_encoding
70
+ encoding = "UTF-16"
71
+ @terminal.encoding = encoding
72
+ assert_equal(encoding, @terminal.encoding)
73
+ end
74
+
75
+ def test_font_desc
76
+ font = Pango::FontDescription.new("Monospace 15")
77
+ @terminal.font_desc = font
78
+ assert_equal(font, @terminal.font_desc)
79
+ end
80
+
81
+ def test_pointer_autohide
82
+ hide = true
83
+ @terminal.pointer_autohide = hide
84
+ assert_true(@terminal.pointer_autohide?)
85
+ end
86
+
87
+ def test_rewrap_on_resize
88
+ omit_if_not_respond(@terminal, :rewrap_on_resize?)
89
+ @terminal.rewrap_on_resize = false
90
+ assert_false(@terminal.rewrap_on_resize?)
91
+ end
92
+
93
+ def test_scroll_background
94
+ scroll = true
95
+ @terminal.scroll_background = scroll
96
+ assert_true(@terminal.scroll_background?)
97
+ end
98
+
99
+ def test_scroll_on_keystroke
100
+ scroll = true
101
+ @terminal.scroll_on_keystroke = scroll
102
+ assert_true(@terminal.scroll_on_keystroke?)
103
+ end
104
+
105
+ def test_scroll_on_output
106
+ scroll = false
107
+ @terminal.scroll_on_output = scroll
108
+ assert_false(@terminal.scroll_on_output?)
109
+ end
110
+
111
+ def test_scrollback_lines
112
+ lines = 1024
113
+ @terminal.scrollback_lines = lines
114
+ assert_equal(lines, @terminal.scrollback_lines)
115
+ end
116
+
117
+ def test_visible_bell
118
+ visible = true
119
+ @terminal.visible_bell = visible
120
+ assert_true(@terminal.visible_bell?)
121
+ end
122
+ end
@@ -0,0 +1,48 @@
1
+ # Copyright (C) 2014 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestTerminalSignals < Test::Unit::TestCase
18
+ def setup
19
+ @terminal = Vte::Terminal.new
20
+ end
21
+
22
+ def test_beep_signal
23
+ called = false
24
+ @terminal.signal_connect("beep") do
25
+ called = true
26
+ end
27
+ @terminal.signal_emit("beep")
28
+ assert_true(called)
29
+ end
30
+
31
+ def test_copy_clipboard_signal
32
+ called = false
33
+ @terminal.signal_connect("copy-clipboard") do
34
+ called = true
35
+ end
36
+ @terminal.signal_emit("copy-clipboard")
37
+ assert_true(called)
38
+ end
39
+
40
+ def test_paste_clipboard_signal
41
+ called = false
42
+ @terminal.signal_connect("paste-clipboard") do
43
+ called = true
44
+ end
45
+ @terminal.signal_emit("paste-clipboard")
46
+ assert_true(called)
47
+ end
48
+ end
@@ -0,0 +1,44 @@
1
+ # Copyright (C) 2014-2015 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestTerminal < Test::Unit::TestCase
18
+ include VteTestUtils
19
+
20
+ def setup
21
+ @terminal = Vte::Terminal.new
22
+ end
23
+
24
+ def test_font
25
+ font = Pango::FontDescription.new("Monospace 16")
26
+ @terminal.font = font
27
+ assert_equal(font, @terminal.font)
28
+ end
29
+
30
+ sub_test_case "#fork_command" do
31
+ test "success" do
32
+ pid = @terminal.fork_command(:argv => ["echo"])
33
+ assert do
34
+ pid > 0
35
+ end
36
+ end
37
+
38
+ test "failure" do
39
+ assert_raise(GLib::SpawnError) do
40
+ @terminal.fork_command(:argv => ["nonexistent"])
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,53 @@
1
+ # Copyright (C) 2015 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestVteVersion < Test::Unit::TestCase
18
+ include VteTestUtils
19
+
20
+ setup do
21
+ unless Vte::Version.const_defined?(:STRING)
22
+ omit("VTE doesn't provide version information")
23
+ end
24
+ end
25
+
26
+ test "STRING" do
27
+ major = Vte::Version::MAJOR
28
+ minor = Vte::Version::MINOR
29
+ micro = Vte::Version::MICRO
30
+ assert_equal([major, minor, micro].join("."),
31
+ Vte::Version::STRING)
32
+ end
33
+
34
+ sub_test_case("#or_later?") do
35
+ test "same" do
36
+ assert_true(Vte::Version.or_later?(Vte::Version::MAJOR,
37
+ Vte::Version::MINOR,
38
+ Vte::Version::MICRO))
39
+ end
40
+
41
+ test "later" do
42
+ assert_true(Vte::Version.or_later?(Vte::Version::MAJOR,
43
+ Vte::Version::MINOR - 1,
44
+ Vte::Version::MICRO))
45
+ end
46
+
47
+ test "earlier" do
48
+ assert_false(Vte::Version.or_later?(Vte::Version::MAJOR,
49
+ Vte::Version::MINOR + 1,
50
+ Vte::Version::MICRO))
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,27 @@
1
+ # Copyright (C) 2014 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ require "test-unit"
18
+ require "test/unit/notify"
19
+
20
+ module VteTestUtils
21
+ private
22
+ def omit_if_not_respond(instance, method_name)
23
+ unless instance.respond_to?(method_name)
24
+ omit("#{instance.class}##{method_name} is not respond.")
25
+ end
26
+ end
27
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vte3
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME2 Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-24 00:00:00.000000000 Z
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gtk3
@@ -16,42 +16,53 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.5
19
+ version: 3.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.5
26
+ version: 3.0.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: gobject-introspection
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 3.0.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 3.0.1
27
41
  description: Ruby/VTE is a Ruby binding of VTE.
28
42
  email: ruby-gnome2-devel-en@lists.sourceforge.net
29
43
  executables: []
30
- extensions:
31
- - ext/vte3/extconf.rb
44
+ extensions: []
32
45
  extra_rdoc_files: []
33
46
  files:
34
47
  - Rakefile
35
- - ext/vte3/depend
36
- - ext/vte3/extconf.rb
37
- - ext/vte3/rbvte.c
38
- - ext/vte3/rbvte3conversions.h
39
- - ext/vte3/rbvte3private.h
40
- - ext/vte3/rbvtecharattributes.c
41
- - ext/vte3/rbvtepty.c
42
- - ext/vte3/rbvtereaper.c
43
- - ext/vte3/rbvteterminal.c
44
- - ext/vte3/rbvteterminalaccessible.c
45
- - extconf.rb
46
48
  - lib/vte3.rb
47
49
  - lib/vte3/deprecated.rb
48
- - sample/multiterm.rb
49
- - sample/terminal.rb
50
+ - lib/vte3/loader.rb
51
+ - lib/vte3/pty.rb
52
+ - lib/vte3/terminal.rb
53
+ - lib/vte3/version.rb
54
+ - test/run-test.rb
55
+ - test/test-pty.rb
56
+ - test/test-terminal-properties.rb
57
+ - test/test-terminal-signals.rb
58
+ - test/test-terminal.rb
59
+ - test/test-version.rb
60
+ - test/vte3-test-utils.rb
50
61
  homepage: http://ruby-gnome2.sourceforge.jp/
51
62
  licenses:
52
63
  - LGPLv2.1 or later
53
64
  metadata: {}
54
- post_install_message: This library is experimental.
65
+ post_install_message:
55
66
  rdoc_options: []
56
67
  require_paths:
57
68
  - lib
@@ -1,6 +0,0 @@
1
- install: install-pc
2
- install-pc:
3
- if test -n "$(pkgconfigdir)"; then \
4
- $(MAKEDIRS) $(pkgconfigdir); \
5
- $(INSTALL_DATA) ruby-vte3.pc $(pkgconfigdir); \
6
- fi
@@ -1,67 +0,0 @@
1
- =begin
2
- extconf.rb for Ruby/VTE extention library
3
- =end
4
-
5
- require 'pathname'
6
-
7
- base_dir = Pathname(__FILE__).dirname.parent.parent.expand_path
8
- top_dir = base_dir.parent
9
- top_build_dir = Pathname(".").parent.parent.parent.expand_path
10
-
11
- mkmf_gnome2_dir = top_dir + "glib2" + 'lib'
12
- version_suffix = ""
13
- unless mkmf_gnome2_dir.exist?
14
- if /(-\d+\.\d+\.\d+)(?:\.\d+)?\z/ =~ base_dir.basename.to_s
15
- version_suffix = $1
16
- mkmf_gnome2_dir = top_dir + "glib2#{version_suffix}" + 'lib'
17
- end
18
- end
19
-
20
- $LOAD_PATH.unshift(mkmf_gnome2_dir.to_s)
21
-
22
- module_name = "vte3"
23
- package_id = "vte-2.90"
24
-
25
- begin
26
- require 'mkmf-gnome2'
27
- rescue LoadError
28
- require 'rubygems'
29
- gem 'glib2'
30
- require 'mkmf-gnome2'
31
- end
32
-
33
- setup_win32(module_name, base_dir)
34
-
35
- unless required_pkg_config_package([package_id, 0, 26, 0],
36
- :debian => "libvte-2.90-dev",
37
- :redhat => "vte3-devel",
38
- :homebrew => "vte3")
39
- exit(false)
40
- end
41
-
42
- ["glib2", "atk", "pango", "gtk3"].each do |package|
43
- directory = "#{package}#{version_suffix}"
44
- build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
45
- add_depend_package(package, "#{directory}/ext/#{package}",
46
- top_dir.to_s,
47
- :top_build_dir => top_build_dir.to_s,
48
- :target_build_dir => build_dir)
49
- end
50
-
51
- vte_headers = ["vte/vte.h"]
52
- have_type("VteTerminalCursorBlinkMode", vte_headers)
53
-
54
- unless have_macro("VTE_CHECK_VERSION", vte_headers)
55
- make_version_header("VTE", package_id, ".")
56
- end
57
-
58
- create_pkg_config_file("Ruby/VTE3", package_id)
59
- $defs << "-DRUBY_VTE3_COMPILATION"
60
- create_makefile(module_name)
61
- pkg_config_dir = with_config("pkg-config-dir")
62
- if pkg_config_dir.is_a?(String)
63
- File.open("Makefile", "ab") do |makefile|
64
- makefile.puts
65
- makefile.puts("pkgconfigdir=#{pkg_config_dir}")
66
- end
67
- end