aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib
diff options
context:
space:
mode:
authorAlexander Marsalek <amarsalek@iaik.tugraz.at>2021-06-23 09:04:51 +0200
committerAlexander Marsalek <amarsalek@iaik.tugraz.at>2021-06-23 09:04:51 +0200
commit676d3e645e18c4033cd83cc2820d7f103c71039d (patch)
treedf0c25cabe36da1ea1f02bc206159e075d4917ac /pdf-as-lib
parent2dc79ba6745051937bfea674700034dc86f690c9 (diff)
downloadpdf-as-4-676d3e645e18c4033cd83cc2820d7f103c71039d.tar.gz
pdf-as-4-676d3e645e18c4033cd83cc2820d7f103c71039d.tar.bz2
pdf-as-4-676d3e645e18c4033cd83cc2820d7f103c71039d.zip
added test for umlaute
Diffstat (limited to 'pdf-as-lib')
-rw-r--r--pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/SignatureBlockParameterTest.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/SignatureBlockParameterTest.java b/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/SignatureBlockParameterTest.java
index 3c76ce11..62d5beaf 100644
--- a/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/SignatureBlockParameterTest.java
+++ b/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/SignatureBlockParameterTest.java
@@ -1,5 +1,6 @@
package at.gv.egiz.pdfas.lib.test.mains;
+import at.gv.egiz.pdfas.common.settings.DefaultSignatureProfileSettings;
import at.gv.egiz.pdfas.common.utils.CheckSignatureBlockParameters;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -44,7 +45,18 @@ public class SignatureBlockParameterTest {
if(checkValid("aaa"+(char) 13 +"aa", "^([\\p{Print}]){1,100}$") == true){assert(false);}
}
-
+ @Test
+ public void testUmlauteValid() {
+ if(checkValid( "ä", DefaultSignatureProfileSettings.SIG_BLOCK_PARAMETER_DEFAULT_VALUE_REGEX) == false){assert(false);}
+ if(checkValid( "ö", DefaultSignatureProfileSettings.SIG_BLOCK_PARAMETER_DEFAULT_VALUE_REGEX) == false){assert(false);}
+ if(checkValid( "ü", DefaultSignatureProfileSettings.SIG_BLOCK_PARAMETER_DEFAULT_VALUE_REGEX) == false){assert(false);}
+ if(checkValid( "Ä", DefaultSignatureProfileSettings.SIG_BLOCK_PARAMETER_DEFAULT_VALUE_REGEX) == false){assert(false);}
+ if(checkValid( "Ö", DefaultSignatureProfileSettings.SIG_BLOCK_PARAMETER_DEFAULT_VALUE_REGEX) == false){assert(false);}
+ if(checkValid( "Ü", DefaultSignatureProfileSettings.SIG_BLOCK_PARAMETER_DEFAULT_VALUE_REGEX) == false){assert(false);}
+ if(checkValid( "ÄÖÜöäüjhsbdjej", DefaultSignatureProfileSettings.SIG_BLOCK_PARAMETER_DEFAULT_VALUE_REGEX) == false){assert(false);}
+ if(checkValid( "aauacnhuisdc Ä Ü Ö aaxsa ö aÜaÖa",
+ DefaultSignatureProfileSettings.SIG_BLOCK_PARAMETER_DEFAULT_VALUE_REGEX) == false){assert(false);}
+ }
public boolean checkValid(String s, String regex) {
return CheckSignatureBlockParameters.isValid(s, regex);
}