Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
#!/usr/bin/env ruby
#
# Usage: ./dev/list_tests.rb
#
# Lists the test names in the given .cpp test file.
require_relative '../src/ruby_supportlib/phusion_passenger/utils/ansi_colors'
include PhusionPassenger::Utils::AnsiColors
def extract_category_name(occurrence)
occurrence =~ / (.+) /
return $1
end
def extract_test_name(occurrence)
occurrence = occurrence.sub(/.*?\((.+)\).*/m, '\1')
occurrence.gsub!(/"\n[ \t]*"/m, '')
occurrence.sub!(/\A"/, '')
occurrence.sub!(/"\Z/, '')
return occurrence
end
def start(filename)
STDOUT.write(DEFAULT_TERMINAL_COLOR)
begin
occurrences = File.read(filename).scan(%r{/\*\*\*\*\* .+? \*\*\*\*\*/|set_test_name\(.+?\);}m)
occurrences.each do |occurrence|
if occurrence =~ %r{\A/}
puts ansi_colorize("" + extract_category_name(occurrence) + "")
else
puts " " + extract_test_name(occurrence)
end
end
ensure
STDOUT.write(RESET)
end
end
start(ARGV[0])