File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed
AnkiDroid/src/test/java/com/ichi2/anki/libanki
libanki/testutils/src/main/java/com/ichi2/anki/libanki/testutils Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ package com.ichi2.anki.libanki
44
55import androidx.test.ext.junit.runners.AndroidJUnit4
66import com.ichi2.anki.libanki.template.MathJax
7+ import com.ichi2.anki.libanki.testutils.clozeClass
78import com.ichi2.testutils.JvmTest
89import org.hamcrest.MatcherAssert.assertThat
910import org.hamcrest.Matchers.containsString
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import anki.notetypes.copy
2020import com.ichi2.anki.backend.stripHTML
2121import com.ichi2.anki.common.utils.annotation.KotlinCleanup
2222import com.ichi2.anki.libanki.exception.ConfirmModSchemaException
23+ import com.ichi2.anki.libanki.testutils.clozeClass
2324import com.ichi2.anki.libanki.testutils.ext.addNote
2425import com.ichi2.testutils.JvmTest
2526import org.hamcrest.MatcherAssert.assertThat
@@ -31,13 +32,9 @@ import org.junit.Assert.assertNotEquals
3132import org.junit.Test
3233import org.junit.runner.RunWith
3334
34- fun clozeClass (): String = " class=\" cloze\" "
35-
36- fun clozeData (data : String ): String = " data-cloze=\" ${data} \" "
37-
3835@RunWith(AndroidJUnit4 ::class )
3936@KotlinCleanup(" improve kotlin code where possible" )
40- class NotetypeTest : JvmTest () {
37+ class NoteTypeTest : JvmTest () {
4138 @Test
4239 fun test_frontSide_field () {
4340 // #8951 - Anki Special-cases {{FrontSide}} on the front to return empty string
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2025 David Allison <davidallisongithub@gmail.com>
3+ *
4+ * This program is free software; you can redistribute it and/or modify it under
5+ * the terms of the GNU General Public License as published by the Free Software
6+ * Foundation; either version 3 of the License, or (at your option) any later
7+ * version.
8+ *
9+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY
10+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License along with
14+ * this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+ package com.ichi2.anki.libanki.testutils
18+
19+ fun clozeClass (): String = " class=\" cloze\" "
You can’t perform that action at this time.
0 commit comments