TesTcl icon indicating copy to clipboard operation
TesTcl copied to clipboard

Add colour output

Open landro opened this issue 11 years ago • 11 comments

green ok red failed

landro avatar Dec 08 '13 20:12 landro

screen shot 2013-12-09 at 7 49 48 am

landro avatar Dec 09 '13 06:12 landro

@Sebastian-Brzuzek, could you give this a go on a windows machine and pull and merge if ok?

landro avatar Dec 09 '13 06:12 landro

@landro I just executed tests and examples on WinXP and have a lot of errors like this one:

Unexpected unknown command invocation 'exec tput -S << setaf'

Maybe you should add an "on" statement similar to the one below to your "it" block?

    it "your description" {
      ...
      on exec tput -S << setaf return "your return value"
      ...
    }

I'm not sure if my environment is setup in correct way, so I will try to test it on Win7 in the evening and let you know if it is the same. I have no time Today to try to fix it, but I will try to look on it during next days.

Sebastian-Brzuzek avatar Dec 09 '13 09:12 Sebastian-Brzuzek

@Sebastian-Brzuzek It might be related to the disabled exec command. I enabled it again to make this work. Make sure you have a clean repo - maybe the easiest is to check out the coloured_messages branch

landro avatar Dec 09 '13 09:12 landro

@landro I was testing on clean check out of the coloured_messages branch, so this is not related to disabled exec command (I was using jtcl to be sure there is no problem with tcl interpreter).

Sebastian-Brzuzek avatar Dec 09 '13 11:12 Sebastian-Brzuzek

@landro I just executed test.cmd on Win7 - result shared here https://gist.github.com/Sebastian-Brzuzek/7878312 There is no error when I run examples.cmd I'm sure this is related to coloured messages not with environment - there is no error when I run tests.cmd from main branch

Sebastian-Brzuzek avatar Dec 09 '13 18:12 Sebastian-Brzuzek

@Sebastian-Brzuzek Oh man, totally forgot about updating and running these tests. Should be ok now. Would you mind retesting it quick? I notice by the way that exec from jtcl is kinda slow some times, and if you hit enter to fast between the tests, the stream is closed, at least on my mac. By the way, I presume you don't see any color coded output on windows, is that correct?

landro avatar Dec 09 '13 19:12 landro

@landro now it looks much better. There are no errors. Your assumption about lack of colours in windows command line is correct as well. I will merge this branch to main in spare time today

Sebastian-Brzuzek avatar Dec 10 '13 03:12 Sebastian-Brzuzek

Hi,

Please wait a little before you merge. I'll send a pull request when ready.

Stefan

Sendt fra min iPhone

Den 10. des. 2013 kl. 04:35 skrev Sebastian Brzuzek [email protected]:

@landro now it looks much better. There are no errors. Your assumption about lack of colours in windows command line is correct as well. I will merge this branch to main in spare time today

— Reply to this email directly or view it on GitHub.

landro avatar Dec 10 '13 07:12 landro

OK. Let me know when there will be final version available (I will try to find the reason of problem on WinXP in the mean time, but we should not wait if it will be difficult to fix on this obsolete platform).

Seba.

Sebastian-Brzuzek avatar Dec 10 '13 08:12 Sebastian-Brzuzek

I found there was incorrect setup of TCLLIBPATH in my WinXP environment pointing to some obsolete version of TesTcl. After cleanup of this environment varialble it looks even on WinXP everything works as expected - both tests.cmd and examples.cmd passed without errors.

Cheers, Seba.

Sebastian-Brzuzek avatar Dec 10 '13 08:12 Sebastian-Brzuzek