fuzzr 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 92f2d6c3862d1c403c3cffd719295d3e8c01b6bbd48e4b4b5fa700fcb49ecffe
4
+ data.tar.gz: 4e33497a3940ec2d889779ff328e1789c8b3631bcc7e61ce2d089aa254baee5a
5
+ SHA512:
6
+ metadata.gz: 0e2b6c8e7a2e94d374632ab0009d0209b6b102b5fdfa4f17e986e57c3d2a39d4cb8ec40f2266d679b5eb2fcbbbd9f9fda2c6f1b1f2e8d701509b279474bd904b
7
+ data.tar.gz: 89b10ac7e11b27611ccff469f65f4ce3583835cd5d2aba5895a1f708abc9e6fa164fd2d21b9a1f7e7b262301c3e1765a3f56b10bc06562eb1b44041fbf2367df
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Remedy IT Expertise BV
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,28 @@
1
+ {rdoc-image:https://badge.fury.io/rb/fuzzr.svg}[https://rubygems.org/gems/fuzzr]
2
+ {rdoc-image:https://www.codefactor.io/repository/github/remedyit/fuzzr/badge}[https://www.codefactor.io/repository/github/remedyit/fuzzr]
3
+
4
+ = fuzz
5
+
6
+ == DESCRIPTION:
7
+
8
+ {fuzzr}[https://github.com/RemedyIT/fuzzr] is an open source fuzz check tool
9
+
10
+ == Bugs
11
+
12
+ If you find a bug, please report it as {fuzzr issue}[https://github.com/RemedyIT/fuzzr/issues].
13
+
14
+ == Warranty
15
+
16
+ This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.
17
+
18
+ == Installing fuzzr
19
+
20
+ fuzzr is distributed as a Ruby Gem. You can download and install fuzzr as a Ruby Gem from the common {Rubygems.org}[https://www.rubygems.org/gems/fuzzr] repository by executing the following command:
21
+
22
+ $ gem install fuzzr
23
+
24
+ The RIDL Gem is a Ruby-only Gem without any dependencies.
25
+
26
+ == Releasing new RIDL Ruby Gem
27
+
28
+ A new fuzzr ruby gem release can be made by incrementing the fuzzr version in link:lib/fuzz/version.rb and create a new release on {github}[https://github.com/RemedyIT/fuzzr/releases] matching the new version (for example v2.7.0). The github {Ruby Gem Release}[https://github.com/RemedyIT/fuzzr/actions?query=workflow%3A%22Ruby+Gem+Release%22] action will automatically create a new gem and push it to {Rubygems.org}[https://www.rubygems.org/gems/fuzzr].
data/bin/fuzz ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ $: << File.join(File.dirname(__FILE__), '..')
3
+ $: << File.join(File.dirname(__FILE__), '..', 'lib')
4
+
5
+ require 'fuzz/fuzz'
6
+
7
+ exit(Fuzz.run ? 0 : 1)
@@ -0,0 +1,5 @@
1
+ taox11\/tao\/x11\/.*
2
+ taox11\/lichk\/.*
3
+ taox11\/util\/md5\.cpp
4
+ .*(C|S|P|SP)\.(h|inl|cpp)
5
+ test\/.*\/tao\/.*
@@ -0,0 +1,37 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_ace_error.rb - TAOX11 ACE_ERROR checker
4
+ #
5
+ # Author: Martin Corino
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class TAOX11AceErrorChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_ace_error
15
+ @description = 'checks against the use of the old ACE logging macros in test code'
16
+ @errormsg = 'detected use of ACE_ERROR, ACE_DEBUG, and/or ACE_ERROR_RETURN'
17
+ end
18
+
19
+ OBJECT_EXTS = ['h', 'hxx', 'hpp', 'c', 'cc', 'cxx', 'cpp', 'H', 'C', 'asm']
20
+
21
+ def applies_to?(object)
22
+ Fuzz::FileObject === object &&
23
+ OBJECT_EXTS.include?(object.ext) &&
24
+ !is_excluded?(object)
25
+ end
26
+
27
+ def run(object, apply_fix)
28
+ object.iterate(fuzz_id) do |lnptr|
29
+ if lnptr.text =~ /(^|\s+)(ACE_ERROR|ACE_ERROR_RETURN|ACE_DEBUG)(\s+|$)/
30
+ lnptr.mark_error
31
+ end
32
+ end
33
+ end
34
+ end
35
+
36
+ Fuzz.register_fzzr(TAOX11AceErrorChecker.new)
37
+ end
@@ -0,0 +1,41 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_catch_ex_as_const.rb - Checks whether an exception is caught as const
4
+ #
5
+ # Author: Marcel Smit
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class ExAsConstChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_catch_ex_as_const
15
+ @description = 'checks whether an exception is caught as const'
16
+ @errormsg = 'exceptions should be caught as const'
17
+ end
18
+
19
+ OBJECT_EXTS = ['h', 'hxx', 'hpp', 'c', 'cc', 'cxx', 'cpp', 'H', 'C']
20
+
21
+ def applies_to?(object)
22
+ Fuzz::FileObject === object &&
23
+ OBJECT_EXTS.include?(object.ext) &&
24
+ !is_excluded?(object)
25
+ end
26
+
27
+ def run(object, apply_fix)
28
+ object.iterate(fuzz_id) do |lnptr|
29
+ if lnptr.text =~ /^\s*(catch\(|catch \()/
30
+ unless lnptr.text =~ /([...])/
31
+ if not lnptr.text =~ /const/
32
+ lnptr.mark_error
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+
40
+ Fuzz.register_fzzr(ExAsConstChecker.new)
41
+ end
@@ -0,0 +1,5 @@
1
+ taox11\/util\/.*
2
+ taox11\/orbsvcs\/tests\/.*
3
+ public\/.*
4
+ test\/.*\/tao\/.*
5
+ .*(C|S|P|SP)\.(h|inl|cpp)
@@ -0,0 +1,37 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_cout_cerr.rb - TAOX11 cout/cerr in core checker
4
+ #
5
+ # Author: Marcel Smit
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class TAOX11CoutCerrChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_cout_cerr
15
+ @description = 'checks against the use of cout and cerr in the CORE code (to be expanded to all code)'
16
+ @errormsg = 'detected use of cout and/or cerr'
17
+ end
18
+
19
+ OBJECT_EXTS = ['h', 'hxx', 'hpp', 'c', 'cc', 'cxx', 'cpp', 'H', 'C']
20
+
21
+ def applies_to?(object)
22
+ Fuzz::FileObject === object &&
23
+ OBJECT_EXTS.include?(object.ext) &&
24
+ !is_excluded?(object)
25
+ end
26
+
27
+ def run(object, apply_fix)
28
+ object.iterate(fuzz_id) do |lnptr|
29
+ if lnptr.text =~ /(^|\s+)(cout|cerr|std::cout|std::cerr|std::wcout|std::wcerr|wcout|wcerr)(\s+|$)/
30
+ lnptr.mark_error
31
+ end
32
+ end
33
+ end
34
+ end
35
+
36
+ Fuzz.register_fzzr(TAOX11CoutCerrChecker.new)
37
+ end
@@ -0,0 +1,37 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_executablebit.rb - executable bit checker
4
+ #
5
+ # Author: Johnny Willemsen
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class ExecutablebitChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_executablebit
15
+ @description = 'checks for executable bit set'
16
+ end
17
+
18
+ OBJECT_EXTS = ['pl', 'sh', 'bat']
19
+
20
+ def applies_to?(object)
21
+ Fuzz::FileObject === object &&
22
+ OBJECT_EXTS.include?(object.ext) &&
23
+ !is_excluded?(object)
24
+ end
25
+
26
+ def run(object, apply_fix)
27
+ if !File::executable?(object.path)
28
+ Fuzz.log_error(%Q{#{object.path} - lacks executable bit})
29
+ false
30
+ end
31
+ true
32
+ end
33
+
34
+ end
35
+
36
+ Fuzz.register_fzzr(ExecutablebitChecker.new)
37
+ end
@@ -0,0 +1,2 @@
1
+ .*(C|S|P|SP)\.(h|inl|cpp)
2
+ test\/.*\/tao\/.*
@@ -0,0 +1,37 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_exit_keyword.rb - TAOX11 exit checker
4
+ #
5
+ # Author: Marcel Smit
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class TAOX11ExitChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_exit_keyword
15
+ @description = 'checks against the use of the exit keyword in test code'
16
+ @errormsg = 'detected use of exit'
17
+ end
18
+
19
+ OBJECT_EXTS = ['h', 'hxx', 'hpp', 'c', 'cc', 'cxx', 'cpp', 'H', 'C']
20
+
21
+ def applies_to?(object)
22
+ Fuzz::FileObject === object &&
23
+ OBJECT_EXTS.include?(object.ext) &&
24
+ !is_excluded?(object)
25
+ end
26
+
27
+ def run(object, apply_fix)
28
+ object.iterate(fuzz_id) do |lnptr|
29
+ if lnptr.text =~ /(^|\s+)(exit)(\s+|$)/
30
+ lnptr.mark_error
31
+ end
32
+ end
33
+ end
34
+ end
35
+
36
+ Fuzz.register_fzzr(TAOX11ExitChecker.new)
37
+ end
@@ -0,0 +1,5 @@
1
+ .*(C|S|P)\.(h|inl|cpp)
2
+ test\/.*\/tao\/.*
3
+ ridl\/.*
4
+ .*\.erb
5
+ .*\.cmd
@@ -0,0 +1,92 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_fileheader.rb - TAOX11 file header checker
4
+ #
5
+ # Author: Marcel Smit
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class TAOX11FileHeaderChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_fileheader
15
+ @description = 'checks whether a file contains a correct file header'
16
+ @errormsg = 'incorrect or no fileheader detected. Fileheaders should start on the first or second line, should have a size of 6 lines and the file name should be on the second line of the header.'
17
+ end
18
+
19
+ def applies_to?(object)
20
+ Fuzz::FileObject === object &&
21
+ !is_excluded?(object)
22
+ end
23
+
24
+ def run(object, apply_fix)
25
+ header_start = nil
26
+ script = false
27
+ object.iterate(fuzz_id) do |lnptr|
28
+ case lnptr.line_nr
29
+ when 1
30
+ if lnptr.text =~ /^(\/[\*]|[#])/
31
+ if not lnptr.text =~ /^(#!)/
32
+ header_start = lnptr.line_nr
33
+ end
34
+ end
35
+ if lnptr.text =~ /^[#]/
36
+ script = true
37
+ end
38
+ when 2
39
+ unless header_start
40
+ if not lnptr.text =~ /^(\/[\*]|[#])/
41
+ lnptr.mark_error 1
42
+ else
43
+ header_start = lnptr.line_nr
44
+ if lnptr.text =~ /^[#]/
45
+ script = true
46
+ end
47
+ end
48
+ else
49
+ if lnptr.text =~ /[\*]\//
50
+ lnptr.mark_error
51
+ end
52
+ if not lnptr.text.match(object.name)
53
+ lnptr.mark_error
54
+ end
55
+ end
56
+ when 3
57
+ if header_start && header_start == 2
58
+ # header on second line so file name should
59
+ # be on the third
60
+ if not lnptr.text.match(object.name)
61
+ lnptr.mark_error
62
+ end
63
+ end
64
+ else
65
+ if header_start
66
+ # for */
67
+ if lnptr.text =~ /[\*]\//
68
+ hdr_lns = 1 + lnptr.line_nr - header_start
69
+ if hdr_lns < 6
70
+ lnptr.mark_error
71
+ lnptr.to_eof # stop
72
+ end
73
+ else
74
+ unless !script
75
+ # for scripts
76
+ if not lnptr.text =~ /[#]/
77
+ hdr_lns = 1 + lnptr.line_nr - header_start
78
+ if hdr_lns < 6
79
+ lnptr.mark_error
80
+ lnptr.to_eof # stop
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end # header_start
86
+ end
87
+ end
88
+ end #def run
89
+ end
90
+
91
+ Fuzz.register_fzzr(TAOX11FileHeaderChecker.new)
92
+ end
@@ -0,0 +1,8 @@
1
+ ChangeLog
2
+ \/MPC$
3
+ MPC\/modules\/GNU.*pm$
4
+ tao\/x11\/Policy.*
5
+ tao\/x11\/.*A\.cpp
6
+ GNUmakefile
7
+ public\/.*(C|S|P|SP)\.(h|inl|cpp)
8
+ ridl\/.*
@@ -0,0 +1,33 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_filename.rb - TAOX11 filename fuzzer
4
+ #
5
+ # Author: Martin Corino
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class FilenameChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_filename
15
+ @description = 'checks against the use of uppercase in file/directory names'
16
+ end
17
+
18
+ def applies_to?(object)
19
+ !is_excluded?(object)
20
+ end
21
+
22
+ def run(object, apply_fix)
23
+ if object.name =~ /[A-Z]/
24
+ Fuzz.log_error(%Q{name for #{object.path} contains uppercase})
25
+ false
26
+ else
27
+ true
28
+ end
29
+ end
30
+ end
31
+
32
+ Fuzz.register_fzzr(FilenameChecker.new)
33
+ end
@@ -0,0 +1,34 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_id_tag.rb - TAOX11 $Id$ tag checker
4
+ #
5
+ # Author: Marcel Smit
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class TAOX11IdTagChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_id_tag
15
+ @description = 'checks against the use of the $Id$ tag'
16
+ @errormsg = 'detected use of $Id:$'
17
+ end
18
+
19
+ def applies_to?(object)
20
+ Fuzz::FileObject === object &&
21
+ !is_excluded?(object)
22
+ end
23
+
24
+ def run(object, apply_fix)
25
+ object.iterate(fuzz_id) do |lnptr|
26
+ if lnptr.text =~ /^\s*([\*]|\/\/|#)\s*([\$]Id)/i
27
+ lnptr.mark_error
28
+ end
29
+ end
30
+ end
31
+ end
32
+
33
+ Fuzz.register_fzzr(TAOX11IdTagChecker.new)
34
+ end
@@ -0,0 +1,6 @@
1
+ taox11\/tao\/x11\/.*
2
+ taox11\/orbsvcs\/orbsvcs\/.*
3
+ taox11\/lichk\/.*
4
+ taox11\/util\/md5\.cpp
5
+ .*(C|S|P|SP)\.(h|inl|cpp)
6
+ test\/.*\/tao\/.*
@@ -0,0 +1,37 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_new_delete.rb - TAOX11 new delete checker
4
+ #
5
+ # Author: Martin Corino
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class TAOX11NewDeleteChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_new_delete
15
+ @description = 'checks against the use of new and/or delete in test code'
16
+ @errormsg = 'detected use of new and/or delete'
17
+ end
18
+
19
+ OBJECT_EXTS = ['h', 'hxx', 'hpp', 'c', 'cc', 'cxx', 'cpp', 'H', 'C']
20
+
21
+ def applies_to?(object)
22
+ Fuzz::FileObject === object &&
23
+ OBJECT_EXTS.include?(object.ext) &&
24
+ !is_excluded?(object)
25
+ end
26
+
27
+ def run(object, apply_fix)
28
+ object.iterate(fuzz_id) do |lnptr|
29
+ if lnptr.text =~ /(^|\s+)(new|delete)(\s+|$)/
30
+ lnptr.mark_error
31
+ end
32
+ end
33
+ end
34
+ end
35
+
36
+ Fuzz.register_fzzr(TAOX11NewDeleteChecker.new)
37
+ end
@@ -0,0 +1,2 @@
1
+ .*(C|S|P|SP)\.(h|inl|cpp)
2
+ test\/.*\/tao\/.*
@@ -0,0 +1,37 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_printf_keyword.rb - TAOX11 printf checker
4
+ #
5
+ # Author: Johnny Willemsen
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class TAOX11PrintfChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_printf_keyword
15
+ @description = 'checks against the use of the printf keyword in test code'
16
+ @errormsg = 'detected use of printf'
17
+ end
18
+
19
+ OBJECT_EXTS = ['h', 'hxx', 'hpp', 'c', 'cc', 'cxx', 'cpp', 'H', 'C']
20
+
21
+ def applies_to?(object)
22
+ Fuzz::FileObject === object &&
23
+ OBJECT_EXTS.include?(object.ext) &&
24
+ !is_excluded?(object)
25
+ end
26
+
27
+ def run(object, apply_fix)
28
+ object.iterate(fuzz_id) do |lnptr|
29
+ if lnptr.text =~ /(^|\s+|::)(printf)(\s+|$)/
30
+ lnptr.mark_error
31
+ end
32
+ end
33
+ end
34
+ end
35
+
36
+ Fuzz.register_fzzr(TAOX11PrintfChecker.new)
37
+ end
@@ -0,0 +1,5 @@
1
+ tao\/x11\/Policy.*
2
+ taox11\/tao\/x11\/.*
3
+ taox11\/tao\/.*
4
+ taox11\/orbsvcs\/orbsvcs\/.*
5
+ public\/.*(C|S|P|SP)\.(h|inl|cpp)
@@ -0,0 +1,38 @@
1
+ # encoding: utf-8
2
+ # -------------------------------------------------------------------
3
+ # check_taox11_namespace.rb - TAOX11 namespace checker
4
+ #
5
+ # Author: Martin Corino
6
+ #
7
+ # Copyright (c) Remedy IT Expertise BV
8
+ # -------------------------------------------------------------------
9
+
10
+ module Fuzzers
11
+ class TAOX11NamespaceChecker
12
+ include Fuzz::Fzzr
13
+ def initialize
14
+ @fuzz_id = :check_taox11_namespace
15
+ @description = 'checks against the use of the TAOX11_NAMESPACE macro in user/test code'
16
+ @errormsg = 'detected use TAOX11_xxx namespace macro'
17
+ end
18
+
19
+ OBJECT_EXTS = ['h', 'hxx', 'hpp', 'c', 'cc', 'cxx', 'cpp', 'H', 'C']
20
+
21
+ def applies_to?(object)
22
+ Fuzz::FileObject === object &&
23
+ OBJECT_EXTS.include?(object.ext) &&
24
+ !is_excluded?(object)
25
+ end
26
+
27
+ def run(object, apply_fix)
28
+ object.iterate(fuzz_id) do |lnptr|
29
+ if lnptr.text =~ /(TAOX11_NAMESPACE|TAOX11_CORBA|TAOX11_PORTABLE_SERVER)::/ ||
30
+ lnptr.text =~ /namespace\s+(TAOX11_NAMESPACE|TAOX11_CORBA|TAOX11_PORTABLE_SERVER)/
31
+ lnptr.mark_error
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ Fuzz.register_fzzr(TAOX11NamespaceChecker.new)
38
+ end
@@ -0,0 +1,52 @@
1
+ #--------------------------------------------------------------------
2
+ # @file console.rb
3
+ # @author Martin Corino
4
+ #
5
+ # @brief Fuzz console wrapper
6
+ #
7
+ # @copyright Copyright (c) Remedy IT Expertise BV
8
+ #--------------------------------------------------------------------
9
+ require 'fuzz/screen'
10
+
11
+ module Fuzz
12
+
13
+ module Console
14
+
15
+ class << self
16
+ def screen
17
+ @screen ||= Screen.new(Fuzz.options[:output] || $stdout, $stdin)
18
+ end
19
+ include Screen::ColorizeMethods
20
+ end
21
+
22
+ def self.print(*args)
23
+ screen.print(*args)
24
+ end
25
+
26
+ def self.println(*args)
27
+ screen.println(*args)
28
+ end
29
+
30
+ def self.error_print(*args)
31
+ screen.error_print(*args)
32
+ end
33
+
34
+ def self.error_println(*args)
35
+ screen.error_println(*args)
36
+ end
37
+
38
+ def self.colorizer_include
39
+ Screen::ColorizeMethods
40
+ end
41
+
42
+ def self.display_break
43
+ println("\n")
44
+ end
45
+
46
+ def self.display_hline(len = nil)
47
+ println("#{'-' * (len || [80, (screen.output_cols / 5 * 4)].min)}\n")
48
+ end
49
+
50
+ end # Console
51
+
52
+ end # Fuzz