Subject: | Windows- test fails because of single quotes |
The last test in text_similarity_strings.t fails because single quotes are
used in the system command; Windows does not recognize single quotes.
I have attached a patch which fixes this, allowing all tests to pass on
Windows.
Subject: | 0001-Changed-single-quotes-to-double-quotes-in-test-comma.patch |
From 3a0368bc35a6044f6b1c08550f1794a5fdd7701a Mon Sep 17 00:00:00 2001
From: Nathan Glenn <garfieldnate@gmail.com>
Date: Thu, 16 Aug 2012 14:53:46 -0400
Subject: [PATCH 1/1] Changed single quotes to double quotes in test command;
on Windows, a single quote has no meaning, so the
arguments to the script were not passed correctly, and
testing failed.
---
t/text_similarity_string.t | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/text_similarity_string.t b/t/text_similarity_string.t
index 31369c4..39fde6a 100644
--- a/t/text_similarity_string.t
+++ b/t/text_similarity_string.t
@@ -63,7 +63,7 @@ is ($output, 0, "match with empties");
## this test case was causing trouble for Windows - changed in 0.07
##$output = `$^X $inc $text_similarity_pl --type Text::Similarity::Overlaps --string 'sir winston churchill' 'winston churchill SIR!!!' `;
-$output = `$^X $inc $text_similarity_pl --type Text::Similarity::Overlaps --string 'sir winston churchill' 'winston churchill sir' `;
+$output = `$^X $inc $text_similarity_pl --type Text::Similarity::Overlaps --string "sir winston churchill" "winston churchill sir" `;
chomp $output;
is ($output, 1, "order doesn't affect score");
--
1.7.11.msysgit.1