Hello, I try to update jsoup too. During the buildprocess in pbuilder I get the message dpkg-source: info: local changes detected, the modified files are: jsoup/src/test/java/org/jsoup/parser/TokeniserStateTest.java dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/jsoup_1.12.1+ds-1.diff.muyC1q dpkg-source: info: you can integrate the local changes with dpkg-source --commit I append the file. I don't understand why the file is rewritten. jsoup is also a dependency of JVerein ITP #929477 Can someone give me a hint? @Markus: Am I allowed to split the patch files? Kind regards -- Mechtilde Stehmann ## Debian Developer ## PGP encryption welcome ## F0E3 7F3D C87A 4998 2899 39E7 F287 7BBA 141A AD7F
Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
jsoup (1.12.1+ds-1) UNRELEASED; urgency=medium
.
[ Mechtilde ]
* debian/salsa-ci.yml was added when the repo was cloned
* New upstream version 1.12.1+ds
* Use debhelper-compat for choosing compat level
+ Removed debian/compat;
+ changed debian/control and
+ added debian/source/lintian-overrides
* removed unmet dependencies
Author: Mechtilde Stehmann <mechtilde@debian.org>
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2019-09-13
--- jsoup-1.12.1+ds.orig/src/test/java/org/jsoup/parser/TokeniserStateTest.java
+++ jsoup-1.12.1+ds/src/test/java/org/jsoup/parser/TokeniserStateTest.java
@@ -1,209 +1,209 @@
-package org.jsoup.parser;
-
-import org.jsoup.Jsoup;
-import org.jsoup.TextUtil;
-import org.jsoup.nodes.Comment;
-import org.jsoup.nodes.Document;
-import org.jsoup.nodes.Element;
-import org.jsoup.nodes.TextNode;
-import org.jsoup.select.Elements;
-import org.junit.Test;
-
-import java.util.Arrays;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-
-public class TokeniserStateTest {
-
- final char[] whiteSpace = { '\t', '\n', '\r', '\f', ' ' };
- final char[] quote = { '\'', '"' };
-
- @Test
- public void ensureSearchArraysAreSorted() {
- char[][] arrays = {
- TokeniserState.attributeSingleValueCharsSorted,
- TokeniserState.attributeDoubleValueCharsSorted,
- TokeniserState.attributeNameCharsSorted,
- TokeniserState.attributeValueUnquoted
- };
-
- for (char[] array : arrays) {
- char[] copy = Arrays.copyOf(array, array.length);
- Arrays.sort(array);
- assertArrayEquals(array, copy);
- }
- }
-
- @Test
- public void testCharacterReferenceInRcdata() {
- String body = "<textarea>You&I</textarea>";
- Document doc = Jsoup.parse(body);
- Elements els = doc.select("textarea");
- assertEquals("You&I", els.text());
- }
-
- @Test
- public void testBeforeTagName() {
- for (char c : whiteSpace) {
- String body = String.format("<div%c>test</div>", c);
- Document doc = Jsoup.parse(body);
- Elements els = doc.select("div");
- assertEquals("test", els.text());
- }
- }
-
- @Test
- public void testEndTagOpen() {
- String body;
- Document doc;
- Elements els;
-
- body = "<div>hello world</";
- doc = Jsoup.parse(body);
- els = doc.select("div");
- assertEquals("hello world</", els.text());
-
- body = "<div>hello world</div>";
- doc = Jsoup.parse(body);
- els = doc.select("div");
- assertEquals("hello world", els.text());
-
- body = "<div>fake</></div>";
- doc = Jsoup.parse(body);
- els = doc.select("div");
- assertEquals("fake", els.text());
-
- body = "<div>fake</?</div>";
- doc = Jsoup.parse(body);
- els = doc.select("div");
- assertEquals("fake", els.text());
- }
-
- @Test
- public void testRcdataLessthanSign() {
- String body;
- Document doc;
- Elements els;
-
- body = "<textarea><fake></textarea>";
- doc = Jsoup.parse(body);
- els = doc.select("textarea");
- assertEquals("<fake>", els.text());
-
- body = "<textarea><open";
- doc = Jsoup.parse(body);
- els = doc.select("textarea");
- assertEquals("", els.text());
-
- body = "<textarea>hello world</?fake</textarea>";
- doc = Jsoup.parse(body);
- els = doc.select("textarea");
- assertEquals("hello world</?fake", els.text());
- }
-
- @Test
- public void testRCDATAEndTagName() {
- for (char c : whiteSpace) {
- String body = String.format("<textarea>data</textarea%c>", c);
- Document doc = Jsoup.parse(body);
- Elements els = doc.select("textarea");
- assertEquals("data", els.text());
- }
- }
-
- @Test
- public void testCommentEndCoverage() {
- String html = "<html><head></head><body><img src=foo><!-- <table><tr><td></table> --! --- --><p>Hello</p></body></html>";
- Document doc = Jsoup.parse(html);
-
- Element body = doc.body();
- Comment comment = (Comment) body.childNode(1);
- assertEquals(" <table><tr><td></table> --! --- ", comment.getData());
- Element p = body.child(1);
- TextNode text = (TextNode) p.childNode(0);
- assertEquals("Hello", text.getWholeText());
- }
-
- @Test
- public void testCommentEndBangCoverage() {
- String html = "<html><head></head><body><img src=foo><!-- <table><tr><td></table> --!---!>--><p>Hello</p></body></html>";
- Document doc = Jsoup.parse(html);
-
- Element body = doc.body();
- Comment comment = (Comment) body.childNode(1);
- assertEquals(" <table><tr><td></table> --!-", comment.getData());
- Element p = body.child(1);
- TextNode text = (TextNode) p.childNode(0);
- assertEquals("Hello", text.getWholeText());
- }
-
- @Test
- public void testPublicIdentifiersWithWhitespace() {
- String expectedOutput = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0//EN\">";
- for (char q : quote) {
- for (char ws : whiteSpace) {
- String[] htmls = {
- String.format("<!DOCTYPE html%cPUBLIC %c-//W3C//DTD HTML 4.0//EN%c>", ws, q, q),
- String.format("<!DOCTYPE html %cPUBLIC %c-//W3C//DTD HTML 4.0//EN%c>", ws, q, q),
- String.format("<!DOCTYPE html PUBLIC%c%c-//W3C//DTD HTML 4.0//EN%c>", ws, q, q),
- String.format("<!DOCTYPE html PUBLIC %c%c-//W3C//DTD HTML 4.0//EN%c>", ws, q, q),
- String.format("<!DOCTYPE html PUBLIC %c-//W3C//DTD HTML 4.0//EN%c%c>", q, q, ws),
- String.format("<!DOCTYPE html PUBLIC%c-//W3C//DTD HTML 4.0//EN%c%c>", q, q, ws)
- };
- for (String html : htmls) {
- Document doc = Jsoup.parse(html);
- assertEquals(expectedOutput, doc.childNode(0).outerHtml());
- }
- }
- }
- }
-
- @Test
- public void testSystemIdentifiersWithWhitespace() {
- String expectedOutput = "<!DOCTYPE html SYSTEM \"http://www.w3.org/TR/REC-html40/strict.dtd\">";
- for (char q : quote) {
- for (char ws : whiteSpace) {
- String[] htmls = {
- String.format("<!DOCTYPE html%cSYSTEM %chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", ws, q, q),
- String.format("<!DOCTYPE html %cSYSTEM %chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", ws, q, q),
- String.format("<!DOCTYPE html SYSTEM%c%chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", ws, q, q),
- String.format("<!DOCTYPE html SYSTEM %c%chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", ws, q, q),
- String.format("<!DOCTYPE html SYSTEM %chttp://www.w3.org/TR/REC-html40/strict.dtd%c%c>", q, q, ws),
- String.format("<!DOCTYPE html SYSTEM%chttp://www.w3.org/TR/REC-html40/strict.dtd%c%c>", q, q, ws)
- };
- for (String html : htmls) {
- Document doc = Jsoup.parse(html);
- assertEquals(expectedOutput, doc.childNode(0).outerHtml());
- }
- }
- }
- }
-
- @Test
- public void testPublicAndSystemIdentifiersWithWhitespace() {
- String expectedOutput = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0//EN\""
- + " \"http://www.w3.org/TR/REC-html40/strict.dtd\">";
- for (char q : quote) {
- for (char ws : whiteSpace) {
- String[] htmls = {
- String.format("<!DOCTYPE html PUBLIC %c-//W3C//DTD HTML 4.0//EN%c"
- + "%c%chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", q, q, ws, q, q),
- String.format("<!DOCTYPE html PUBLIC %c-//W3C//DTD HTML 4.0//EN%c"
- + "%chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", q, q, q, q)
- };
- for (String html : htmls) {
- Document doc = Jsoup.parse(html);
- assertEquals(expectedOutput, doc.childNode(0).outerHtml());
- }
- }
- }
- }
-
- @Test public void handlesLessInTagThanAsNewTag() {
- // out of spec, but clear author intent
- String html = "<p\n<p<div id=one <span>Two";
- Document doc = Jsoup.parse(html);
- assertEquals("<p></p><p></p><div id=\"one\"><span>Two</span></div>", TextUtil.stripNewlines(doc.body().html()));
- }
-}
+package org.jsoup.parser;
+
+import org.jsoup.Jsoup;
+import org.jsoup.TextUtil;
+import org.jsoup.nodes.Comment;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.nodes.TextNode;
+import org.jsoup.select.Elements;
+import org.junit.Test;
+
+import java.util.Arrays;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+public class TokeniserStateTest {
+
+ final char[] whiteSpace = { '\t', '\n', '\r', '\f', ' ' };
+ final char[] quote = { '\'', '"' };
+
+ @Test
+ public void ensureSearchArraysAreSorted() {
+ char[][] arrays = {
+ TokeniserState.attributeSingleValueCharsSorted,
+ TokeniserState.attributeDoubleValueCharsSorted,
+ TokeniserState.attributeNameCharsSorted,
+ TokeniserState.attributeValueUnquoted
+ };
+
+ for (char[] array : arrays) {
+ char[] copy = Arrays.copyOf(array, array.length);
+ Arrays.sort(array);
+ assertArrayEquals(array, copy);
+ }
+ }
+
+ @Test
+ public void testCharacterReferenceInRcdata() {
+ String body = "<textarea>You&I</textarea>";
+ Document doc = Jsoup.parse(body);
+ Elements els = doc.select("textarea");
+ assertEquals("You&I", els.text());
+ }
+
+ @Test
+ public void testBeforeTagName() {
+ for (char c : whiteSpace) {
+ String body = String.format("<div%c>test</div>", c);
+ Document doc = Jsoup.parse(body);
+ Elements els = doc.select("div");
+ assertEquals("test", els.text());
+ }
+ }
+
+ @Test
+ public void testEndTagOpen() {
+ String body;
+ Document doc;
+ Elements els;
+
+ body = "<div>hello world</";
+ doc = Jsoup.parse(body);
+ els = doc.select("div");
+ assertEquals("hello world</", els.text());
+
+ body = "<div>hello world</div>";
+ doc = Jsoup.parse(body);
+ els = doc.select("div");
+ assertEquals("hello world", els.text());
+
+ body = "<div>fake</></div>";
+ doc = Jsoup.parse(body);
+ els = doc.select("div");
+ assertEquals("fake", els.text());
+
+ body = "<div>fake</?</div>";
+ doc = Jsoup.parse(body);
+ els = doc.select("div");
+ assertEquals("fake", els.text());
+ }
+
+ @Test
+ public void testRcdataLessthanSign() {
+ String body;
+ Document doc;
+ Elements els;
+
+ body = "<textarea><fake></textarea>";
+ doc = Jsoup.parse(body);
+ els = doc.select("textarea");
+ assertEquals("<fake>", els.text());
+
+ body = "<textarea><open";
+ doc = Jsoup.parse(body);
+ els = doc.select("textarea");
+ assertEquals("", els.text());
+
+ body = "<textarea>hello world</?fake</textarea>";
+ doc = Jsoup.parse(body);
+ els = doc.select("textarea");
+ assertEquals("hello world</?fake", els.text());
+ }
+
+ @Test
+ public void testRCDATAEndTagName() {
+ for (char c : whiteSpace) {
+ String body = String.format("<textarea>data</textarea%c>", c);
+ Document doc = Jsoup.parse(body);
+ Elements els = doc.select("textarea");
+ assertEquals("data", els.text());
+ }
+ }
+
+ @Test
+ public void testCommentEndCoverage() {
+ String html = "<html><head></head><body><img src=foo><!-- <table><tr><td></table> --! --- --><p>Hello</p></body></html>";
+ Document doc = Jsoup.parse(html);
+
+ Element body = doc.body();
+ Comment comment = (Comment) body.childNode(1);
+ assertEquals(" <table><tr><td></table> --! --- ", comment.getData());
+ Element p = body.child(1);
+ TextNode text = (TextNode) p.childNode(0);
+ assertEquals("Hello", text.getWholeText());
+ }
+
+ @Test
+ public void testCommentEndBangCoverage() {
+ String html = "<html><head></head><body><img src=foo><!-- <table><tr><td></table> --!---!>--><p>Hello</p></body></html>";
+ Document doc = Jsoup.parse(html);
+
+ Element body = doc.body();
+ Comment comment = (Comment) body.childNode(1);
+ assertEquals(" <table><tr><td></table> --!-", comment.getData());
+ Element p = body.child(1);
+ TextNode text = (TextNode) p.childNode(0);
+ assertEquals("Hello", text.getWholeText());
+ }
+
+ @Test
+ public void testPublicIdentifiersWithWhitespace() {
+ String expectedOutput = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0//EN\">";
+ for (char q : quote) {
+ for (char ws : whiteSpace) {
+ String[] htmls = {
+ String.format("<!DOCTYPE html%cPUBLIC %c-//W3C//DTD HTML 4.0//EN%c>", ws, q, q),
+ String.format("<!DOCTYPE html %cPUBLIC %c-//W3C//DTD HTML 4.0//EN%c>", ws, q, q),
+ String.format("<!DOCTYPE html PUBLIC%c%c-//W3C//DTD HTML 4.0//EN%c>", ws, q, q),
+ String.format("<!DOCTYPE html PUBLIC %c%c-//W3C//DTD HTML 4.0//EN%c>", ws, q, q),
+ String.format("<!DOCTYPE html PUBLIC %c-//W3C//DTD HTML 4.0//EN%c%c>", q, q, ws),
+ String.format("<!DOCTYPE html PUBLIC%c-//W3C//DTD HTML 4.0//EN%c%c>", q, q, ws)
+ };
+ for (String html : htmls) {
+ Document doc = Jsoup.parse(html);
+ assertEquals(expectedOutput, doc.childNode(0).outerHtml());
+ }
+ }
+ }
+ }
+
+ @Test
+ public void testSystemIdentifiersWithWhitespace() {
+ String expectedOutput = "<!DOCTYPE html SYSTEM \"http://www.w3.org/TR/REC-html40/strict.dtd\">";
+ for (char q : quote) {
+ for (char ws : whiteSpace) {
+ String[] htmls = {
+ String.format("<!DOCTYPE html%cSYSTEM %chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", ws, q, q),
+ String.format("<!DOCTYPE html %cSYSTEM %chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", ws, q, q),
+ String.format("<!DOCTYPE html SYSTEM%c%chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", ws, q, q),
+ String.format("<!DOCTYPE html SYSTEM %c%chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", ws, q, q),
+ String.format("<!DOCTYPE html SYSTEM %chttp://www.w3.org/TR/REC-html40/strict.dtd%c%c>", q, q, ws),
+ String.format("<!DOCTYPE html SYSTEM%chttp://www.w3.org/TR/REC-html40/strict.dtd%c%c>", q, q, ws)
+ };
+ for (String html : htmls) {
+ Document doc = Jsoup.parse(html);
+ assertEquals(expectedOutput, doc.childNode(0).outerHtml());
+ }
+ }
+ }
+ }
+
+ @Test
+ public void testPublicAndSystemIdentifiersWithWhitespace() {
+ String expectedOutput = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0//EN\""
+ + " \"http://www.w3.org/TR/REC-html40/strict.dtd\">";
+ for (char q : quote) {
+ for (char ws : whiteSpace) {
+ String[] htmls = {
+ String.format("<!DOCTYPE html PUBLIC %c-//W3C//DTD HTML 4.0//EN%c"
+ + "%c%chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", q, q, ws, q, q),
+ String.format("<!DOCTYPE html PUBLIC %c-//W3C//DTD HTML 4.0//EN%c"
+ + "%chttp://www.w3.org/TR/REC-html40/strict.dtd%c>", q, q, q, q)
+ };
+ for (String html : htmls) {
+ Document doc = Jsoup.parse(html);
+ assertEquals(expectedOutput, doc.childNode(0).outerHtml());
+ }
+ }
+ }
+ }
+
+ @Test public void handlesLessInTagThanAsNewTag() {
+ // out of spec, but clear author intent
+ String html = "<p\n<p<div id=one <span>Two";
+ Document doc = Jsoup.parse(html);
+ assertEquals("<p></p><p></p><div id=\"one\"><span>Two</span></div>", TextUtil.stripNewlines(doc.body().html()));
+ }
+}
Attachment:
signature.asc
Description: OpenPGP digital signature