Patch for lib/test/unit/ui/gtk/testrunner.rb

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default Patch for lib/test/unit/ui/gtk/testrunner.rb

    Hi,

    In Ruby-1.8.1 and before, lib/test/unit/ui/gtk/testrunner.rb contains
    some errors. The set_font resuce-clause is because this font may not be
    available on some platforms, in which case the program would abort.

    Here's the patch:

    --- /tmp/ruby-1.8.1/lib/test/unit/ui/gtk/testrunner.rb Wed Feb 12 05:22:35 2003
    +++ testrunner.rb Tue Nov 11 12:50:46 2003
    @@ -100,12 +100,12 @@
    end

    def show_fault(fault) # :nodoc:
    - raw_show_fault(fault.longDisplay)
    + raw_show_fault(fault.long_display)
    end

    def raw_show_fault(string) # :nodoc:
    - faultDetailLabel.set_text(string)
    - outerDetailSubPanel.queue_resize
    + fault_detail_label.set_text(string)
    + outer_detail_sub_panel.queue_resize
    end

    def clear_fault # :nodoc:
    @@ -328,7 +328,9 @@
    @fault_detail_label = EnhancedLabel.new("")
    style = Gtk::Style.new
    font = Gdk::Font.font_load("-*-Courier New-medium-r-normal--*-120-*-*-*-*-*-*")
    - style.set_font(font)
    + begin
    + style.set_font(font)
    + rescue ArgumentError; end
    @fault_detail_label.set_style(style)
    @fault_detail_label.set_justify(Gtk::JUSTIFY_LEFT)
    @fault_detail_label.set_line_wrap(false)



    ----------------------

    Regards,

    Michael

    Michael Neumann Guest

  2. Similar Questions and Discussions

    1. Test::Unit non-auto-run test case?
      I'm getting a handle on the Test::Unit library, and the automatically-running test case example was extremely simple to get running, but now I want...
    2. Test::Unit -- multiple errors in test method ???
      Hi ! I have been writing some unit tests with Test::Unit. I've noted that when an assertion fails in a test method, the remaining assertions...
    3. Method test::unit::TestSuite#<<(test)
      Hi, I suggest to change the definition of this method slightly: current: # Adds the test to the suite. def <<(test) @tests << test end
    4. Test order in Test::Unit
      On Sun, Jul 06, 2003 at 02:05:57AM +0900, Nathaniel Talbott wrote: instance_eval is also extremely useful; it lets you get at instance variables...
    5. Test::Unit GUI
      nathaniel@NOSPAMtalbott.ws (nathaniel@NOSPAMtalbott.ws) wrote: Hello Nathaniel! Have you considered to include gtk2 patch for Test::Unit...
  3. #2

    Default Re: Patch for lib/test/unit/ui/gtk/testrunner.rb

    Michael Neumann [mailto:mneumann@ntecs.de] wrote:
    > In Ruby-1.8.1 and before, lib/test/unit/ui/gtk/testrunner.rb
    > contains some errors.
    Thankfully Nobu had already fixed the errors. Thanks Nobu!

    > The set_font resuce-clause is because
    > this font may not be available on some platforms, in which
    > case the program would abort.
    OK, I've committed this patch. Can someone with GTK test it out to make sure
    it works OK?

    Thanks,


    Nathaniel

    <:((><


    Nathaniel Talbott Guest

  4. #3

    Default Re: Patch for lib/test/unit/ui/gtk/testrunner.rb

    On Tue, Nov 11, 2003 at 11:58:50PM +0900, Nathaniel Talbott wrote:
    > Michael Neumann [mailto:mneumann@ntecs.de] wrote:
    >
    > > In Ruby-1.8.1 and before, lib/test/unit/ui/gtk/testrunner.rb
    > > contains some errors.
    >
    > Thankfully Nobu had already fixed the errors. Thanks Nobu!
    >
    >
    > > The set_font resuce-clause is because
    > > this font may not be available on some platforms, in which
    > > case the program would abort.
    >
    > OK, I've committed this patch. Can someone with GTK test it out to make sure
    > it works OK?
    I've tested it on FreeBSD. It works. But sure, others should test it, too.

    Regards,

    Michael

    Michael Neumann Guest

  5. #4

    Default Re: Patch for lib/test/unit/ui/gtk/testrunner.rb

    Michael Neumann [mailto:mneumann@ntecs.de] wrote:
    > > OK, I've committed this patch. Can someone with GTK test it out to
    > > make sure it works OK?
    >
    > I've tested it on FreeBSD. It works. But sure, others should
    > test it, too.
    Sorry, didn't mean to imply you hadn't tested it... I just like verification
    that it works as I've applied it in the Ruby CVS tree, as I could have
    goofed something up when adding it. Can you grab the latest CVS and check to
    make sure everything's hunky-dory?

    Thanks,


    Nathaniel

    <:((><


    Nathaniel Talbott Guest

  6. #5

    Default Re: Patch for lib/test/unit/ui/gtk/testrunner.rb

    On Wed, Nov 12, 2003 at 12:27:01AM +0900, Nathaniel Talbott wrote:
    > Michael Neumann [mailto:mneumann@ntecs.de] wrote:
    >
    > > > OK, I've committed this patch. Can someone with GTK test it out to
    > > > make sure it works OK?
    > >
    > > I've tested it on FreeBSD. It works. But sure, others should
    > > test it, too.
    >
    > Sorry, didn't mean to imply you hadn't tested it... I just like verification
    > that it works as I've applied it in the Ruby CVS tree, as I could have
    > goofed something up when adding it. Can you grab the latest CVS and check to
    > make sure everything's hunky-dory?
    Done. It works with Ruby 1.8 (not tested under 1.8.1).

    Regards,

    Michael

    Michael Neumann Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139