HotCocoa / hotcocoa

MacRuby HotCocoa UI library
120 stars 8 forks source link

Tests fail with compilation error: U_REGEX_RULE_SYNTAX #15

Closed isaac closed 13 years ago

isaac commented 13 years ago

Here is the full error:


  1) Error:
test_copy_to_copies_everything(TestHotCocoaTemplate):
RegexpError: regexp `^/var/folders/aN/aNboDWwJEWyei6J1f1Kxxk+++TI/-Tmp-/template_test' compilation error: U_REGEX_RULE_SYNTAX
    /Users/isaac/src/hotcocoa/test/test_template.rb:in `block'
    /Users/isaac/src/hotcocoa/test/test_template.rb:50:in `test_copy_to_copies_everything'

My regex skills are not the greatest so I'm not too sure what is going on here. This change doesn't do quite the same thing as the previous code but it may be sufficient for testing purposes.

What do you think?

ferrous26 commented 13 years ago

I believe the problem is that I naively assumed that the TMPDIR name will not cause problems. But the '+++' in the directory path is causing the problem:

± irb
irb(main):001:0> /a+++/
SyntaxError: (irb):1: regexp `a+++' compilation error: U_REGEX_RULE_SYNTAX

Thanks for fixing that!