Added coloured output to Ruby, Python and Lua examples

This commit is contained in:
James Booth
2014-06-11 21:34:37 +01:00
parent 4ccbeb99ae
commit 2cf98ce8c4
3 changed files with 12 additions and 0 deletions

View File

@@ -107,6 +107,10 @@ module RubyTest
def self.handle_lower()
return Proc.new { | win, line |
Prof::win_show(win, line.downcase)
Prof::win_show_red(win, "Red")
Prof::win_show_yellow(win, "Yellow")
Prof::win_show_green(win, "Green")
Prof::win_show_cyan(win, "Cyan")
}
end
end

View File

@@ -23,6 +23,10 @@ end
local function handle_bracket(win, line)
prof_win_show(win, "(" .. line .. ")")
prof_win_show_red(win, "Red")
prof_win_show_yellow(win, "Yellow")
prof_win_show_green(win, "Green")
prof_win_show_cyan(win, "Cyan")
end
local function cmd_bracket(line)

View File

@@ -31,6 +31,10 @@ def _cmd_upper(line):
def _handle_upper(win, line):
prof.win_show(win, line.upper())
prof.win_show_red(win, "Red")
prof.win_show_yellow(win, "Yellow")
prof.win_show_green(win, "Green")
prof.win_show_cyan(win, "Cyan")
def prof_init(version, status):
prof.cons_show("python-test: init, " + version + ", " + status)