[jsoup] 02/04: Refreshed the patch
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Thu Nov 21 01:01:46 UTC 2013
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository jsoup.
commit ba00b08a2247e5bd80b02cebdac3381261b45fa9
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Thu Nov 21 01:49:35 2013 +0100
Refreshed the patch
---
debian/changelog | 4 +-
debian/patches/dfsg-free-test-data.patch | 159 ++++++++++++++----------------
2 files changed, 78 insertions(+), 85 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 01e26e0..d962d5b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
-jsoup (1.7.2-2) UNRELEASED; urgency=low
+jsoup (1.7.3-1) UNRELEASED; urgency=low
+ * New upstream release
+ * Refreshed the patch
* Replaced debian/get-orig-source with debian/orig-tar.sh called from uscan
* Use XZ compression for the upstream tarball
* Updated Standards-Version to 3.9.5 (no changes)
diff --git a/debian/patches/dfsg-free-test-data.patch b/debian/patches/dfsg-free-test-data.patch
index 266ceec..e8ceca7 100644
--- a/debian/patches/dfsg-free-test-data.patch
+++ b/debian/patches/dfsg-free-test-data.patch
@@ -1,98 +1,79 @@
-From: Jakub Adam <jakub.adam at ktknet.cz>
-Date: Sun, 8 Apr 2012 11:44:38 +0200
-Subject: dfsg-free-test-data
-
----
- src/test/java/org/jsoup/integration/ParseTest.java | 108 +-
- .../resources/htmltests/wikipedia-article-1.html | 1169 ++++++++++++++++++++
- 2 files changed, 1192 insertions(+), 85 deletions(-)
- create mode 100644 src/test/resources/htmltests/wikipedia-article-1.html
-
+Description: Use free test data
+Author: Jakub Adam <jakub.adam at ktknet.cz>
+Forwarded: not-needed
--- a/src/test/java/org/jsoup/integration/ParseTest.java
+++ b/src/test/java/org/jsoup/integration/ParseTest.java
-@@ -6,6 +6,7 @@
+@@ -5,6 +5,7 @@
+ import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
- import static org.junit.Assert.*;
import org.junit.Test;
+import org.junit.Ignore;
- import java.io.File;
- import java.io.IOException;
-@@ -19,50 +20,41 @@
+ import java.io.*;
+ import java.net.URISyntaxException;
+@@ -19,6 +20,45 @@
public class ParseTest {
@Test
-- public void testSmhBizArticle() throws IOException {
-- File in = getFile("/htmltests/smh-biz-article-1.html");
+ public void testWikipediaArticle() throws IOException {
+ File in = getFile("/htmltests/wikipedia-article-1.html");
- Document doc = Jsoup.parse(in, "UTF-8",
-- "http://www.smh.com.au/business/the-boards-next-fear-the-female-quota-20100106-lteq.html");
-- assertEquals("The board’s next fear: the female quota",
++ Document doc = Jsoup.parse(in, "UTF-8",
+ "http://en.wikipedia.org/wiki/Debian");
+ assertEquals("Kepler’s laws of planetary motion - Wikipedia, the free encyclopedia",
- doc.title()); // note that the apos in the source is a literal ’ (8217), not escaped or '
-- assertEquals("en", doc.select("html").attr("xml:lang"));
-
-- Elements articleBody = doc.select(".articleBody > *");
-- assertEquals(17, articleBody.size());
-- // todo: more tests!
++ doc.title()); // note that the apos in the source is a literal ’ (8217), not escaped or '
++
+ assertEquals("en", doc.select("html").attr("lang"));
+ Elements thumbInner = doc.select(".thumbinner > *");
+ assertEquals(10, thumbInner.size());
-
-- }
--
-- @Test
-- public void testNewsHomepage() throws IOException {
-- File in = getFile("/htmltests/news-com-au-home.html");
-- Document doc = Jsoup.parse(in, "UTF-8", "http://www.news.com.au/");
-- assertEquals("News.com.au | News from Australia and around the world online | NewsComAu", doc.title());
-- assertEquals("Brace yourself for Metro meltdown", doc.select(".id1225817868581 h4").text().trim());
++
+ assertEquals("Kepler's laws of planetary motion", doc.select(".mw-body h1").text().trim());
-
-- Element a = doc.select("a[href=/entertainment/horoscopes]").first();
-- assertEquals("/entertainment/horoscopes", a.attr("href"));
-- assertEquals("http://www.news.com.au/entertainment/horoscopes", a.attr("abs:href"));
++
+ Element a = doc.select("a[href=/wiki/File:Kepler_laws_diagram.svg]").first();
+ assertEquals("/wiki/File:Kepler_laws_diagram.svg", a.attr("href"));
+ assertEquals("http://en.wikipedia.org/wiki/File:Kepler_laws_diagram.svg", a.attr("abs:href"));
-
-- Element hs = doc.select("a[href*=naughty-corners-are-a-bad-idea]").first();
++
+ Element hs = doc.select("a[href*=stargaze]").first();
- assertEquals(
-- "http://www.heraldsun.com.au/news/naughty-corners-are-a-bad-idea-for-kids/story-e6frf7jo-1225817899003",
++ assertEquals(
+ "http://www-istp.gsfc.nasa.gov/stargaze/Skeplaws.htm",
- hs.attr("href"));
- assertEquals(hs.attr("href"), hs.attr("abs:href"));
-- }
-
-- @Test
-- public void testGoogleSearchIpod() throws IOException {
-- File in = getFile("/htmltests/google-ipod.html");
-- Document doc = Jsoup.parse(in, "UTF-8", "http://www.google.com/search?hl=en&q=ipod&aq=f&oq=&aqi=g10");
-- assertEquals("ipod - Google Search", doc.title());
-- Elements results = doc.select("h3.r > a");
-- assertEquals(12, results.size());
-- assertEquals(
-- "http://news.google.com/news?hl=en&q=ipod&um=1&ie=UTF-8&ei=uYlKS4SbBoGg6gPf-5XXCw&sa=X&oi=news_group&ct=title&resnum=1&ved=0CCIQsQQwAA",
++ hs.attr("href"));
++ assertEquals(hs.attr("href"), hs.attr("abs:href"));
++
+ Elements results = doc.select("span.reference-text > a");
+ assertEquals(15, results.size());
+ assertEquals("http://demonstrations.wolfram.com/KeplersSecondLaw/",
- results.get(0).attr("href"));
-- assertEquals("http://www.apple.com/itunes/",
++ results.get(0).attr("href"));
+ assertEquals("http://plato.stanford.edu/archives/win2008/entries/newton-principia/",
- results.get(1).attr("href"));
++ results.get(1).attr("href"));
+
+ a = doc.select("a[href=//ja.wikipedia.org/wiki/%E3%82%B1%E3%83%97%E3%83%A9%E3%83%BC%E3%81%AE%E6%B3%95%E5%89%87]").first();
+ assertEquals("日本語", a.text());
+
+ Element p = doc.select("p:contains(different parts in its orbit").first();
+ assertEquals("Now as the first law states that the planet follows an ellipse, the planet is at different distances from the Sun at different parts in its orbit. So the planet has to move faster when it is closer to the Sun so that it sweeps equal areas in equal times.", p.text());
++ }
++
++ @Test
++ @Ignore
+ public void testSmhBizArticle() throws IOException {
+ File in = getFile("/htmltests/smh-biz-article-1.html");
+ Document doc = Jsoup.parse(in, "UTF-8",
+@@ -34,6 +74,7 @@
+ }
+
+ @Test
++ @Ignore
+ public void testNewsHomepage() throws IOException {
+ File in = getFile("/htmltests/news-com-au-home.html");
+ Document doc = Jsoup.parse(in, "UTF-8", "http://www.news.com.au/");
+@@ -52,6 +93,7 @@
}
@Test
-@@ -74,6 +66,7 @@
++ @Ignore
+ public void testGoogleSearchIpod() throws IOException {
+ File in = getFile("/htmltests/google-ipod.html");
+ Document doc = Jsoup.parse(in, "UTF-8", "http://www.google.com/search?hl=en&q=ipod&aq=f&oq=&aqi=g10");
+@@ -74,6 +116,7 @@
}
@Test
@@ -100,7 +81,7 @@ Subject: dfsg-free-test-data
public void testYahooJp() throws IOException {
File in = getFile("/htmltests/yahoo-jp.html");
Document doc = Jsoup.parse(in, "UTF-8", "http://www.yahoo.co.jp/index.html"); // http charset is utf-8.
-@@ -85,6 +78,7 @@
+@@ -85,6 +128,7 @@
}
@Test
@@ -108,31 +89,30 @@ Subject: dfsg-free-test-data
public void testBaidu() throws IOException {
// tests <meta http-equiv="Content-Type" content="text/html;charset=gb2312">
File in = getFile("/htmltests/baidu-cn-home.html");
-@@ -140,24 +134,6 @@
- assertEquals("新", doc.text());
+@@ -109,6 +153,7 @@
+ }
+
+ @Test
++ @Ignore
+ public void testBaiduVariant() throws IOException {
+ // tests <meta charset> when preceded by another <meta>
+ File in = getFile("/htmltests/baidu-variant.html");
+@@ -151,6 +196,7 @@
}
-- @Test
-- public void testNytArticle() throws IOException {
-- // has tags like <nyt_text>
-- File in = getFile("/htmltests/nyt-article-1.html");
-- Document doc = Jsoup.parse(in, null, "http://www.nytimes.com/2010/07/26/business/global/26bp.html?hp");
--
-- Element headline = doc.select("nyt_headline[version=1.0]").first();
-- assertEquals("As BP Lays Out Future, It Will Not Include Hayward", headline.text());
-- }
--
-- @Test
-- public void testYahooArticle() throws IOException {
-- File in = getFile("/htmltests/yahoo-article-1.html");
-- Document doc = Jsoup.parse(in, "UTF-8", "http://news.yahoo.com/s/nm/20100831/bs_nm/us_gm_china");
-- Element p = doc.select("p:contains(Volt will be sold in the United States").first();
-- assertEquals("In July, GM said its electric Chevrolet Volt will be sold in the United States at $41,000 -- $8,000 more than its nearest competitor, the Nissan Leaf.", p.text());
-- }
--
- File getFile(String resourceName) {
- try {
- File file = new File(ParseTest.class.getResource(resourceName).toURI());
+ @Test
++ @Ignore
+ public void testNytArticle() throws IOException {
+ // has tags like <nyt_text>
+ File in = getFile("/htmltests/nyt-article-1.html");
+@@ -161,6 +207,7 @@
+ }
+
+ @Test
++ @Ignore
+ public void testYahooArticle() throws IOException {
+ File in = getFile("/htmltests/yahoo-article-1.html");
+ Document doc = Jsoup.parse(in, "UTF-8", "http://news.yahoo.com/s/nm/20100831/bs_nm/us_gm_china");
--- /dev/null
+++ b/src/test/resources/htmltests/wikipedia-article-1.html
@@ -0,0 +1,1169 @@
@@ -1305,3 +1285,14 @@ Subject: dfsg-free-test-data
+<script src="//geoiplookup.wikimedia.org/" type="text/javascript"></script><!-- Served by srv227 in 0.132 secs. -->
+ </body>
+</html>
+--- a/src/test/java/org/jsoup/nodes/DocumentTest.java
++++ b/src/test/java/org/jsoup/nodes/DocumentTest.java
+@@ -87,7 +87,7 @@
+ TextUtil.stripNewlines(clone.html()));
+ }
+
+- @Test public void testLocation() throws IOException {
++ @Test @Ignore public void testLocation() throws IOException {
+ File in = new ParseTest().getFile("/htmltests/yahoo-jp.html");
+ Document doc = Jsoup.parse(in, "UTF-8", "http://www.yahoo.co.jp/index.html");
+ String location = doc.location();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jsoup.git
More information about the pkg-java-commits
mailing list