summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Nichols <nichoj@gentoo.org>2007-03-08 05:54:25 +0000
committerJoshua Nichols <nichoj@gentoo.org>2007-03-08 05:54:25 +0000
commitc1248f8e546cc6d0705226dedf027be9c47748c4 (patch)
tree09e883df877806e1d6bbb223c0fff24210230523 /dev-java/jvyaml/files
parentNow will only use javac for compilation. See http://jira.codehaus.org/browse/... (diff)
downloadgentoo-2-c1248f8e546cc6d0705226dedf027be9c47748c4.tar.gz
gentoo-2-c1248f8e546cc6d0705226dedf027be9c47748c4.tar.bz2
gentoo-2-c1248f8e546cc6d0705226dedf027be9c47748c4.zip
Added a patch which should fix issues with running tests. Made junit be only a build time dependency.
(Portage version: 2.1.2-r12)
Diffstat (limited to 'dev-java/jvyaml/files')
-rw-r--r--dev-java/jvyaml/files/digest-jvyaml-0.2.1-r13
-rw-r--r--dev-java/jvyaml/files/jvyaml-0.2.1-tests.patch34
2 files changed, 37 insertions, 0 deletions
diff --git a/dev-java/jvyaml/files/digest-jvyaml-0.2.1-r1 b/dev-java/jvyaml/files/digest-jvyaml-0.2.1-r1
new file mode 100644
index 000000000000..1e2c86f6afcf
--- /dev/null
+++ b/dev-java/jvyaml/files/digest-jvyaml-0.2.1-r1
@@ -0,0 +1,3 @@
+MD5 9936e39850a2fc778e8bd36697a094f6 jvyaml-src-0.2.1.tar.gz 202550
+RMD160 92b11e208f194365e669f0923294fa5a37e60723 jvyaml-src-0.2.1.tar.gz 202550
+SHA256 a21c47679bac174b6185265358c7c8e151ac1ee8c4f9fbceebe9b15a37a10382 jvyaml-src-0.2.1.tar.gz 202550
diff --git a/dev-java/jvyaml/files/jvyaml-0.2.1-tests.patch b/dev-java/jvyaml/files/jvyaml-0.2.1-tests.patch
new file mode 100644
index 000000000000..5dac1832afee
--- /dev/null
+++ b/dev-java/jvyaml/files/jvyaml-0.2.1-tests.patch
@@ -0,0 +1,34 @@
+Only in jvyaml-0.2.1-patched/: build
+Files jvyaml-0.2.1/lib/jvyaml.jar and jvyaml-0.2.1-patched/lib/jvyaml.jar differ
+diff -ru jvyaml-0.2.1/src/test/org/jvyaml/YAMLDumpTest.java jvyaml-0.2.1-patched/src/test/org/jvyaml/YAMLDumpTest.java
+--- jvyaml-0.2.1/src/test/org/jvyaml/YAMLDumpTest.java 2006-09-24 13:07:19.000000000 -0400
++++ jvyaml-0.2.1-patched/src/test/org/jvyaml/YAMLDumpTest.java 2007-03-08 00:39:04.000000000 -0500
+@@ -28,6 +28,8 @@
+ import java.util.List;
+ import java.util.HashMap;
+ import java.util.ArrayList;
++import java.util.TimeZone;
++import java.text.DecimalFormat;
+
+ import junit.framework.TestCase;
+
+@@ -71,9 +73,18 @@
+ final java.util.Calendar cal = java.util.Calendar.getInstance();
+ cal.clear();
+ cal.set(1982,5-1,3); // Java's months are zero-based...
++
++ // Nasty hack to figure out timezone so we can figure out what to
++ // expect when we do YAML#dump
++ TimeZone tz = cal.getTimeZone();
++ int offset = tz.getOffset(cal.getTimeInMillis()) / 3600000;
++ DecimalFormat format = new DecimalFormat("00");
++ String offsetString = format.format(offset);
++ offsetString = ( offset >= 0 ? "+" : "") + offsetString;
+
+ final TestBean toDump = new TestBean("Ola Bini", 24, cal.getTime());
+- assertEquals("--- !java/object:org.jvyaml.TestBean\nname: Ola Bini\nage: 24\nborn: 1982-05-03 00:00:00 +02:00\n", YAML.dump(toDump));
++// assertEquals("--- !java/object:org.jvyaml.TestBean\nname: Ola Bini\nage: 24\nborn: 1982-05-03 00:00:00 +02:00\n", YAML.dump(toDump));
++ assertEquals("--- !java/object:org.jvyaml.TestBean\nname: Ola Bini\nage: 24\nborn: 1982-05-03 00:00:00 " + offsetString + ":00\n", YAML.dump(toDump));
+
+ }
+ }// YAMLDumpTest