> Watir Result is like this: <"Do you want to continue. \n Click on continue 
> Button.> expected but was
> <"Do you want to continue. \r\n Click on continue Button?

So that "\r\n" means "carriage return -- line feed", and it has a long
history.  http://en.wikipedia.org/wiki/Carriage_return

What's bad in your situation is that Ruby (and Perl and many other
languages) usually interprets "\n" to be the carriage-return-line-feed
on whatever platform Ruby is installed on.  But test/unit is not doing
that in your case.

If it were me, I would use assert_match and a regular expression, like this:
################################
require 'test/unit'

class TC_Spike < Test::Unit::TestCase
  def test_crlf

data = "first line
second line"

assert_match(/first line\s+second line/,data)
end
end
###############################

change the regexp to see it fail

<"first line\nsecond line"> expected to be =~
</first line\w+second line/>.
_______________________________________________
Wtr-general mailing list
[EMAIL PROTECTED]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to