]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Command line parameters override fop conf settings when set (they won't override...
authorMehdi Houshmand <mehdi@apache.org>
Thu, 5 Jul 2012 09:22:26 +0000 (09:22 +0000)
committerMehdi Houshmand <mehdi@apache.org>
Thu, 5 Jul 2012 09:22:26 +0000 (09:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1357517 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/cli/CommandLineOptions.java
test/java/org/apache/fop/afp/AFPEventProcessingTestCase.java
test/java/org/apache/fop/apps/FopConfParserTestCase.java

index 5a770c3ba35c0aab0b80d044522b6bbce2278be5..ea5a20d27f3bd410733c561a502db54f99da0ba6 100644 (file)
@@ -1040,6 +1040,12 @@ public class CommandLineOptions {
             } catch (SAXException e) {
                 throw new FOPException(e);
             }
+            if (!strictValidation) {
+                fopFactoryBuilder.setStrictFOValidation(strictValidation);
+            }
+            if (useComplexScriptFeatures) {
+                fopFactoryBuilder.setComplexScriptFeatures(useComplexScriptFeatures);
+            }
         }
         factory = fopFactoryBuilder.build();
      }
index 521deacea31fc9b9e9be8e0de95a59739ba76c1f..d1b47846bc018e9211f211f7b431518241ec55a1 100644 (file)
@@ -26,6 +26,7 @@ import org.junit.Test;
 
 import org.apache.xmlgraphics.util.MimeConstants;
 
+import org.apache.fop.apps.FOPException;
 import org.apache.fop.events.EventProcessingTestCase;
 
 
@@ -49,12 +50,12 @@ public class AFPEventProcessingTestCase {
         testInvalidConfigEvent("afp-font-missing.xconf", ".fontConfigMissing");
     }
 
-    @Test
+    @Test(expected = FOPException.class)
     public void testInvalidCharactersetName() throws Exception {
         testInvalidConfigEvent("afp-invalid-characterset.xconf", ".characterSetNameInvalid");
     }
 
-    @Test
+    @Test(expected = FOPException.class)
     public void testinvalidConfig() throws Exception {
         testInvalidConfigEvent("afp-invalid-config.xconf", ".invalidConfiguration");
     }
index 2fe939f767f51bf32eac49d6066307bed41775fe..775bca30a20de63fb357d6638c8178abe0f82ab5 100644 (file)
@@ -77,7 +77,7 @@ public class FopConfParserTestCase {
     @Test
     public void testStrictUserConfigValidation() {
         builder.setStrictValidation(false);
-        assertFalse(buildFactory().validateUserConfigStrictly());
+        assertFalse(buildFactory().validateStrictly());
     }
 
     @Test