[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

dbates at webkit.org dbates at webkit.org
Wed Dec 22 12:22:37 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 84be34e2db13412db7156d4a736fad7aa9276f12
Author: dbates at webkit.org <dbates at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 20 15:07:32 2010 +0000

    2010-08-20  Daniel Bates  <dbates at rim.com>
    
            Reviewed by Eric Seidel.
    
            svn-apply doesn't detect empty line with Windows line endings
            after property value
            https://bugs.webkit.org/show_bug.cgi?id=43981
    
            Part 2 of 2
    
            Add unit tests that were not landed in the first commit.
    
            * Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl:
              - Added the following test cases:
                "SVN: binary file (isBinary true) using Windows line endings"
                "SVN: property diff, followed by file change diff using Windows line endings"
                "SVN: two consecutive property diffs using Windows line endings"
                "SVN: binary file with executable bit change usng Windows line endings"
                "SVN: binary file followed by property change on different file using Windows line endings"
                "SVN: binary file followed by file change on different file using Windows line endings"
                "SVN: file change diff with property change, followed by property change diff using Windows line endings"
                "SVN: file change diff with property change, followed by file change diff using Windows line endings"
            * Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl:
              - Added the following test cases:
                "add svn:executable, followed by empty line and start of next diff using Windows line endings"
                "add svn:executable, followed by empty line and start of next property diff using Windows line endings"
                "multi-line '+' change, followed by empty line and start of next diff using Windows line endings"
                "multi-line '+' change, followed by empty line and start of next property diff using Windows line endings"
                "add svn:executable, followed by empty line and start of binary patch using Windows line endings"
                "multi-line '+' change, followed by empty line and start of binary patch using Windows line endings"
                "multi-line '-' change, followed by multi-line '+' change, empty line, and start of binary patch using Windows line endings"
                "single-line '+' with trailing new line using Windows line endings"
                "single-line '+' with trailing new line, followed by empty line and start of binary patch using Windows line endings"
                "single-line '-' change with trailing new line, and single-line '+' change using Windows line endings"
                "multi-line '-' change with trailing new line, and multi-line '+' change using Windows line endings"
            * Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl:
              - Added the following test cases:
                "single-line '-' change followed by empty line with Windows line endings"
                "multi-line '+' change and start of binary patch with Windows line endings"
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65734 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 92b6256..4ce76cd 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -6,6 +6,46 @@
         after property value
         https://bugs.webkit.org/show_bug.cgi?id=43981
 
+        Part 2 of 2
+
+        Add unit tests that were not landed in the first commit.
+
+        * Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl:
+          - Added the following test cases:
+            "SVN: binary file (isBinary true) using Windows line endings"
+            "SVN: property diff, followed by file change diff using Windows line endings"
+            "SVN: two consecutive property diffs using Windows line endings"
+            "SVN: binary file with executable bit change usng Windows line endings"
+            "SVN: binary file followed by property change on different file using Windows line endings"
+            "SVN: binary file followed by file change on different file using Windows line endings"
+            "SVN: file change diff with property change, followed by property change diff using Windows line endings"
+            "SVN: file change diff with property change, followed by file change diff using Windows line endings"
+        * Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl:
+          - Added the following test cases:
+            "add svn:executable, followed by empty line and start of next diff using Windows line endings"
+            "add svn:executable, followed by empty line and start of next property diff using Windows line endings"
+            "multi-line '+' change, followed by empty line and start of next diff using Windows line endings"
+            "multi-line '+' change, followed by empty line and start of next property diff using Windows line endings"
+            "add svn:executable, followed by empty line and start of binary patch using Windows line endings"
+            "multi-line '+' change, followed by empty line and start of binary patch using Windows line endings"
+            "multi-line '-' change, followed by multi-line '+' change, empty line, and start of binary patch using Windows line endings"
+            "single-line '+' with trailing new line using Windows line endings"
+            "single-line '+' with trailing new line, followed by empty line and start of binary patch using Windows line endings"
+            "single-line '-' change with trailing new line, and single-line '+' change using Windows line endings"
+            "multi-line '-' change with trailing new line, and multi-line '+' change using Windows line endings"
+        * Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl:
+          - Added the following test cases:
+            "single-line '-' change followed by empty line with Windows line endings"
+            "multi-line '+' change and start of binary patch with Windows line endings"
+
+2010-08-20  Daniel Bates  <dbates at rim.com>
+
+        Reviewed by Eric Seidel.
+
+        svn-apply doesn't detect empty line with Windows line endings
+        after property value
+        https://bugs.webkit.org/show_bug.cgi?id=43981
+
         Fixes an issue where an empty line following the property value
         in an SVN property change diff would not be detected if it had
         Windows line endings (i.e. ended in CRLF). Hence it was consumed
diff --git a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl
index 245916c..9fe077f 100644
--- a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl
+++ b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl
@@ -104,6 +104,44 @@ undef],
 },
 {
     # New test
+    diffName => "SVN: binary file (isBinary true) using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Index: test_file.swf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: test_file.swf
+___________________________________________________________________
+Name: svn:mime-type
+   + application/octet-stream
+
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+END
+),
+    expectedReturn => [
+[{
+    svnConvertedText =>  toWindowsLineEndings(<<'END', # Same as input text
+Index: test_file.swf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+END
+),
+    indexPath => "test_file.swf",
+    isBinary => 1,
+    isSvn => 1,
+}],
+undef],
+    expectedNextLine => undef,
+},
+{
+    # New test
     diffName => "SVN: leading junk",
     inputText => <<'END',
 
@@ -344,6 +382,34 @@ END
 },
 {
     # New test
+    diffName => "SVN: property diff, followed by file change diff using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Property changes on: Makefile
+___________________________________________________________________
+Deleted: svn:executable
+   - *
+
+Index: Makefile.shared
+===================================================================
+--- Makefile.shared	(revision 60021)
++++ Makefile.shared	(working copy)
+@@ -1,3 +1,4 @@
++
+SCRIPTS_PATH ?= ../WebKitTools/Scripts
+XCODE_OPTIONS = `perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print XcodeOptionString()'` $(ARGS)
+END
+),
+    expectedReturn => [
+[{
+    executableBitDelta => -1,
+    indexPath => "Makefile",
+    isSvn => 1,
+}],
+"Index: Makefile.shared\r\n"],
+    expectedNextLine => "===================================================================\r\n",
+},
+{
+    # New test
     diffName => "SVN: copied file with property change",
     inputText => <<'END',
 Index: NMakefile
@@ -392,6 +458,31 @@ END
 "Property changes on: Makefile.shared\n"],
     expectedNextLine => "___________________________________________________________________\n",
 },
+{
+    # New test
+    diffName => "SVN: two consecutive property diffs using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Property changes on: Makefile
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+
+Property changes on: Makefile.shared
+___________________________________________________________________
+Added: svn:executable
+   + *
+END
+),
+    expectedReturn => [
+[{
+    executableBitDelta => 1,
+    indexPath => "Makefile",
+    isSvn => 1,
+}],
+"Property changes on: Makefile.shared\r\n"],
+    expectedNextLine => "___________________________________________________________________\r\n",
+},
 ####
 # Property Changes: Binary files
 ##
@@ -436,6 +527,47 @@ undef],
 },
 {
     # New test
+    diffName => "SVN: binary file with executable bit change usng Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Index: test_file.swf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: test_file.swf
+___________________________________________________________________
+Name: svn:mime-type
+   + application/octet-stream
+Name: svn:executable
+   + *
+
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+END
+),
+    expectedReturn => [
+[{
+    svnConvertedText =>  toWindowsLineEndings(<<'END', # Same as input text
+Index: test_file.swf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+END
+),
+    executableBitDelta => 1,
+    indexPath => "test_file.swf",
+    isBinary => 1,
+    isSvn => 1,
+}],
+undef],
+    expectedNextLine => undef,
+},
+{
+    # New test
     diffName => "SVN: binary file followed by property change on different file",
     inputText => <<'END',
 Index: test_file.swf
@@ -478,6 +610,50 @@ END
 },
 {
     # New test
+    diffName => "SVN: binary file followed by property change on different file using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Index: test_file.swf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: test_file.swf
+___________________________________________________________________
+Name: svn:mime-type
+   + application/octet-stream
+
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+
+Property changes on: Makefile
+___________________________________________________________________
+Added: svn:executable
+   + *
+END
+),
+    expectedReturn => [
+[{
+    svnConvertedText =>  toWindowsLineEndings(<<'END', # Same as input text
+Index: test_file.swf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+
+END
+),
+    indexPath => "test_file.swf",
+    isBinary => 1,
+    isSvn => 1,
+}],
+"Property changes on: Makefile\r\n"],
+    expectedNextLine => "___________________________________________________________________\r\n",
+},
+{
+    # New test
     diffName => "SVN: binary file followed by file change on different file",
     inputText => <<'END',
 Index: test_file.swf
@@ -523,6 +699,55 @@ END
 "Index: Makefile\n"],
     expectedNextLine => "===================================================================\n",
 },
+{
+    # New test
+    diffName => "SVN: binary file followed by file change on different file using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Index: test_file.swf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: test_file.swf
+___________________________________________________________________
+Name: svn:mime-type
+   + application/octet-stream
+
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+
+Index: Makefile
+===================================================================
+--- Makefile	(revision 60021)
++++ Makefile	(working copy)
+@@ -1,3 +1,4 @@
++
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKit2 WebKitTools 
+
+ all:
+END
+),
+    expectedReturn => [
+[{
+    svnConvertedText =>  toWindowsLineEndings(<<'END', # Same as input text
+Index: test_file.swf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+
+END
+),
+    indexPath => "test_file.swf",
+    isBinary => 1,
+    isSvn => 1,
+}],
+"Index: Makefile\r\n"],
+    expectedNextLine => "===================================================================\r\n",
+},
 ####
 # Property Changes: File change with property change
 ##
@@ -577,6 +802,57 @@ END
 },
 {
     # New test
+    diffName => "SVN: file change diff with property change, followed by property change diff using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Index: Makefile
+===================================================================
+--- Makefile	(revision 60021)
++++ Makefile	(working copy)
+@@ -1,3 +1,4 @@
++
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKit2 WebKitTools 
+
+ all:
+
+Property changes on: Makefile
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+
+Property changes on: Makefile.shared
+___________________________________________________________________
+Deleted: svn:executable
+   - *
+END
+),
+    expectedReturn => [
+[{
+    svnConvertedText =>  toWindowsLineEndings(<<'END', # Same as input text
+Index: Makefile
+===================================================================
+--- Makefile	(revision 60021)
++++ Makefile	(working copy)
+@@ -1,3 +1,4 @@
++
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKit2 WebKitTools 
+
+ all:
+
+
+
+END
+),
+    executableBitDelta => 1,
+    indexPath => "Makefile",
+    isSvn => 1,
+    sourceRevision => "60021",
+}],
+"Property changes on: Makefile.shared\r\n"],
+    expectedNextLine => "___________________________________________________________________\r\n",
+},
+{
+    # New test
     diffName => "SVN: file change diff with property change, followed by file change diff",
     inputText => <<'END',
 Index: Makefile
@@ -626,6 +902,59 @@ END
 "Index: Makefile.shared\n"],
     expectedNextLine => "===================================================================\n",
 },
+{
+    # New test
+    diffName => "SVN: file change diff with property change, followed by file change diff using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Index: Makefile
+===================================================================
+--- Makefile	(revision 60021)
++++ Makefile	(working copy)
+@@ -1,3 +1,4 @@
++
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKit2 WebKitTools 
+
+ all:
+
+Property changes on: Makefile
+___________________________________________________________________
+Name: svn:executable
+   - *
+
+Index: Makefile.shared
+===================================================================
+--- Makefile.shared	(revision 60021)
++++ Makefile.shared	(working copy)
+@@ -1,3 +1,4 @@
++
+SCRIPTS_PATH ?= ../WebKitTools/Scripts
+XCODE_OPTIONS = `perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print XcodeOptionString()'` $(ARGS)
+END
+),
+    expectedReturn => [
+[{
+    svnConvertedText =>  toWindowsLineEndings(<<'END', # Same as input text
+Index: Makefile
+===================================================================
+--- Makefile	(revision 60021)
++++ Makefile	(working copy)
+@@ -1,3 +1,4 @@
++
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKit2 WebKitTools 
+
+ all:
+
+
+END
+),
+    executableBitDelta => -1,
+    indexPath => "Makefile",
+    isSvn => 1,
+    sourceRevision => "60021",
+}],
+"Index: Makefile.shared\r\n"],
+    expectedNextLine => "===================================================================\r\n",
+},
 ####
 #    Git test cases
 ##
diff --git a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl
index cff7c2e..bdca1ab 100644
--- a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl
+++ b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl
@@ -131,6 +131,25 @@ END
 },
 {
     # New test
+    diffName => "add svn:executable, followed by empty line and start of next diff using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Added: svn:executable
+   + *
+
+Index: Makefile.shared
+END
+),
+    expectedReturn => [
+{
+    name => "svn:executable",
+    propertyChangeDelta => 1,
+    value => "*",
+},
+"\r\n"],
+    expectedNextLine => "Index: Makefile.shared\r\n",
+},
+{
+    # New test
     diffName => "add svn:executable, followed by empty line and start of next property diff",
     inputText => <<'END',
 Added: svn:executable
@@ -149,6 +168,25 @@ END
 },
 {
     # New test
+    diffName => "add svn:executable, followed by empty line and start of next property diff using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Added: svn:executable
+   + *
+
+Property changes on: Makefile.shared
+END
+),
+    expectedReturn => [
+{
+    name => "svn:executable",
+    propertyChangeDelta => 1,
+    value => "*",
+},
+"\r\n"],
+    expectedNextLine => "Property changes on: Makefile.shared\r\n",
+},
+{
+    # New test
     diffName => "multi-line '+' change, followed by empty line and start of next diff",
     inputText => <<'END',
 Name: documentation
@@ -169,6 +207,27 @@ END
 },
 {
     # New test
+    diffName => "multi-line '+' change, followed by empty line and start of next diff using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Name: documentation
+   + A
+long sentence that spans
+multiple lines.
+
+Index: Makefile.shared
+END
+),
+    expectedReturn => [
+{
+    name => "documentation",
+    propertyChangeDelta => 1,
+    value => "A\r\nlong sentence that spans\r\nmultiple lines.",
+},
+"\r\n"],
+    expectedNextLine => "Index: Makefile.shared\r\n",
+},
+{
+    # New test
     diffName => "multi-line '+' change, followed by empty line and start of next property diff",
     inputText => <<'END',
 Name: documentation
@@ -187,6 +246,27 @@ END
 "\n"],
     expectedNextLine => "Property changes on: Makefile.shared\n",
 },
+{
+    # New test
+    diffName => "multi-line '+' change, followed by empty line and start of next property diff using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Name: documentation
+   + A
+long sentence that spans
+multiple lines.
+
+Property changes on: Makefile.shared
+END
+),
+    expectedReturn => [
+{
+    name => "documentation",
+    propertyChangeDelta => 1,
+    value => "A\r\nlong sentence that spans\r\nmultiple lines.",
+},
+"\r\n"],
+    expectedNextLine => "Property changes on: Makefile.shared\r\n",
+},
 ####
 # Property value followed by empty line and start of binary patch
 ##
@@ -210,6 +290,25 @@ END
 },
 {
     # New test
+    diffName => "add svn:executable, followed by empty line and start of binary patch using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Added: svn:executable
+   + *
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+END
+),
+    expectedReturn => [
+{
+    name => "svn:executable",
+    propertyChangeDelta => 1,
+    value => "*",
+},
+"\r\n"],
+    expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\r\n",
+},
+{
+    # New test
     diffName => "multi-line '+' change, followed by empty line and start of binary patch",
     inputText => <<'END',
 Name: documentation
@@ -230,6 +329,27 @@ END
 },
 {
     # New test
+    diffName => "multi-line '+' change, followed by empty line and start of binary patch using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Name: documentation
+   + A
+long sentence that spans
+multiple lines.
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+END
+),
+    expectedReturn => [
+{
+    name => "documentation",
+    propertyChangeDelta => 1,
+    value => "A\r\nlong sentence that spans\r\nmultiple lines.",
+},
+"\r\n"],
+    expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\r\n",
+},
+{
+    # New test
     diffName => "multi-line '-' change, followed by multi-line '+' change, empty line, and start of binary patch",
     inputText => <<'END',
 Modified: documentation
@@ -251,6 +371,30 @@ END
 "\n"],
     expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\n",
 },
+{
+    # New test
+    diffName => "multi-line '-' change, followed by multi-line '+' change, empty line, and start of binary patch using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Modified: documentation
+   - A
+long sentence that spans
+multiple lines.
+   + Another
+long sentence that spans
+multiple lines.
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+END
+),
+    expectedReturn => [
+{
+    name => "documentation",
+    propertyChangeDelta => 1,
+    value => "Another\r\nlong sentence that spans\r\nmultiple lines.",
+},
+"\r\n"],
+    expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\r\n",
+},
 ####
 # Successive properties
 ##
@@ -340,6 +484,24 @@ END
 },
 {
     # New test
+    diffName => "single-line '+' with trailing new line using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Added: documentation
+   + A sentence.
+
+END
+),
+    expectedReturn => [
+{
+    name => "documentation",
+    propertyChangeDelta => 1,
+    value => "A sentence.",
+},
+"\r\n"],
+    expectedNextLine => undef,
+},
+{
+    # New test
     diffName => "single-line '+' with trailing new line, followed by empty line and start of binary patch",
     inputText => <<'END',
 Added: documentation
@@ -359,6 +521,26 @@ END
 },
 {
     # New test
+    diffName => "single-line '+' with trailing new line, followed by empty line and start of binary patch using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Added: documentation
+   + A sentence.
+
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+END
+),
+    expectedReturn => [
+{
+    name => "documentation",
+    propertyChangeDelta => 1,
+    value => "A sentence.",
+},
+"\r\n"],
+    expectedNextLine => "\r\n",
+},
+{
+    # New test
     diffName => "single-line '-' change with trailing new line, and single-line '+' change",
     inputText => <<'END',
 Modified: documentation
@@ -377,6 +559,25 @@ END
 },
 {
     # New test
+    diffName => "single-line '-' change with trailing new line, and single-line '+' change using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Modified: documentation
+   - A long sentence.
+
+   + A sentence.
+END
+),
+    expectedReturn => [
+{
+    name => "documentation",
+    propertyChangeDelta => -1, # Since we only interpret the '-' property.
+    value => "A long sentence.",
+},
+"\r\n"],
+    expectedNextLine => "   + A sentence.\r\n",
+},
+{
+    # New test
     diffName => "multi-line '-' change with trailing new line, and multi-line '+' change",
     inputText => <<'END',
 Modified: documentation
@@ -397,6 +598,29 @@ END
 "\n"],
     expectedNextLine => "   + Another\n",
 },
+{
+    # New test
+    diffName => "multi-line '-' change with trailing new line, and multi-line '+' change using Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+Modified: documentation
+   - A
+long sentence that spans
+multiple lines.
+
+   + Another
+long sentence that spans
+multiple lines.
+END
+),
+    expectedReturn => [
+{
+    name => "documentation",
+    propertyChangeDelta => -1, # Since we only interpret the '-' property.
+    value => "A\r\nlong sentence that spans\r\nmultiple lines.",
+},
+"\r\n"],
+    expectedNextLine => "   + Another\r\n",
+},
 );
 
 my $testCasesCount = @testCaseHashRefs;
diff --git a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl
index 5c79862..5fc2ff1 100644
--- a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl
+++ b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl
@@ -58,7 +58,7 @@ END
 },
 {
     # New test
-    diffName => "single-line '-' change followed by empty line",
+    diffName => "single-line '-' change followed by empty line with Unix line endings",
     inputText => <<'END',
    - *
 
@@ -68,6 +68,17 @@ END
 },
 {
     # New test
+    diffName => "single-line '-' change followed by empty line with Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+   - *
+
+END
+),
+    expectedReturn => ["*", "\r\n"],
+    expectedNextLine => undef,
+},
+{
+    # New test
     diffName => "single-line '-' change followed by the next property",
     inputText => <<'END',
    - *
@@ -91,6 +102,20 @@ END
 },
 {
     # New test
+    diffName => "multi-line '+' change and start of binary patch with Windows line endings",
+    inputText => toWindowsLineEndings(<<'END',
+   + A
+long sentence that spans
+multiple lines.
+
+Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
+END
+),
+    expectedReturn => ["A\r\nlong sentence that spans\r\nmultiple lines.", "\r\n"],
+    expectedNextLine => "Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==\r\n",
+},
+{
+    # New test
     diffName => "multi-line '-' change followed by '+' single-line change",
     inputText => <<'END',
    - A

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list