Skip to content

Commit 1897b41

Browse files
committed
raise version, fix CoreTest
1 parent 0b359d2 commit 1897b41

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

app/src/androidTest/java/at/tomtasche/reader/test/CoreTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public void test() {
7878
CoreWrapper.CoreOptions coreOptions = new CoreWrapper.CoreOptions();
7979
coreOptions.inputPath = m_testFile.getAbsolutePath();
8080
coreOptions.outputPath = outputPath.getPath();
81-
coreOptions.cachePath = cachePath.getPath();
8281
coreOptions.editable = true;
82+
coreOptions.cachePath = cachePath.getPath();
8383

8484
CoreWrapper.CoreResult coreResult = CoreWrapper.parse(coreOptions);
8585
Assert.assertEquals(0, coreResult.errorCode);
@@ -97,11 +97,13 @@ public void test() {
9797
public void testPasswordProtectedDocumentWithoutPassword() {
9898
File cacheDir = InstrumentationRegistry.getInstrumentation().getTargetContext().getCacheDir();
9999
File outputDir = new File(cacheDir, "output_password_test");
100+
File cachePath = new File(cacheDir, "core_cache");
100101

101102
CoreWrapper.CoreOptions coreOptions = new CoreWrapper.CoreOptions();
102103
coreOptions.inputPath = m_passwordTestFile.getAbsolutePath();
103104
coreOptions.outputPath = outputDir.getPath();
104105
coreOptions.editable = false;
106+
coreOptions.cachePath = cachePath.getPath();
105107

106108
CoreWrapper.CoreResult coreResult = CoreWrapper.parse(coreOptions);
107109
Assert.assertEquals(-2, coreResult.errorCode);
@@ -111,12 +113,14 @@ public void testPasswordProtectedDocumentWithoutPassword() {
111113
public void testPasswordProtectedDocumentWithWrongPassword() {
112114
File cacheDir = InstrumentationRegistry.getInstrumentation().getTargetContext().getCacheDir();
113115
File outputDir = new File(cacheDir, "output_password_test");
116+
File cachePath = new File(cacheDir, "core_cache");
114117

115118
CoreWrapper.CoreOptions coreOptions = new CoreWrapper.CoreOptions();
116119
coreOptions.inputPath = m_passwordTestFile.getAbsolutePath();
117120
coreOptions.outputPath = outputDir.getPath();
118121
coreOptions.password = "wrongpassword";
119122
coreOptions.editable = false;
123+
coreOptions.cachePath = cachePath.getPath();
120124

121125
CoreWrapper.CoreResult coreResult = CoreWrapper.parse(coreOptions);
122126
Assert.assertEquals(-2, coreResult.errorCode);
@@ -126,12 +130,14 @@ public void testPasswordProtectedDocumentWithWrongPassword() {
126130
public void testPasswordProtectedDocumentWithCorrectPassword() {
127131
File cacheDir = InstrumentationRegistry.getInstrumentation().getTargetContext().getCacheDir();
128132
File outputDir = new File(cacheDir, "output_password_test");
133+
File cachePath = new File(cacheDir, "core_cache");
129134

130135
CoreWrapper.CoreOptions coreOptions = new CoreWrapper.CoreOptions();
131136
coreOptions.inputPath = m_passwordTestFile.getAbsolutePath();
132137
coreOptions.outputPath = outputDir.getPath();
133138
coreOptions.password = "passwort";
134139
coreOptions.editable = false;
140+
coreOptions.cachePath = cachePath.getPath();
135141

136142
CoreWrapper.CoreResult coreResult = CoreWrapper.parse(coreOptions);
137143
Assert.assertEquals(0, coreResult.errorCode);

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
44
android:installLocation="auto"
5-
android:versionCode="192"
6-
android:versionName="3.38"
5+
android:versionCode="195"
6+
android:versionName="3.40"
77
tools:ignore="GoogleAppIndexingWarning">
88

99
<uses-permission android:name="android.permission.INTERNET" />

0 commit comments

Comments
 (0)