Restrict dialogue line symbols
This commit is contained in:
@@ -37,8 +37,9 @@ from novelwriter.common import (
|
||||
formatFileFilter, formatInt, formatTime, formatTimeStamp, formatVersion,
|
||||
fuzzyTime, getFileSize, hexToInt, isHandle, isItemClass, isItemLayout,
|
||||
isItemType, isListInstance, isTitleTag, jsonEncode, makeFileNameSafe,
|
||||
minmax, numberToRoman, openExternalPath, readTextFile, simplified,
|
||||
transferCase, uniqueCompact, xmlElement, xmlIndent, xmlSubElem, yesNo
|
||||
minmax, numberToRoman, openExternalPath, processDialogSymbols,
|
||||
readTextFile, simplified, transferCase, uniqueCompact, xmlElement,
|
||||
xmlIndent, xmlSubElem, yesNo
|
||||
)
|
||||
|
||||
from tests.mocked import causeOSError
|
||||
@@ -377,6 +378,14 @@ def testBaseCommon_uniqueCompact():
|
||||
assert uniqueCompact("3 2 1") == "123"
|
||||
|
||||
|
||||
@pytest.mark.base
|
||||
def testBaseCommon_processDialogSymbols():
|
||||
"""Test the processDialogSymbols function."""
|
||||
assert processDialogSymbols("abc") == ""
|
||||
assert processDialogSymbols("\u00ab\u00ab\u00bb\u00bb") == "\u00ab\u00bb"
|
||||
assert processDialogSymbols("-\u2013\u2014\u2015") == "\u2013\u2014\u2015"
|
||||
|
||||
|
||||
@pytest.mark.base
|
||||
def testBaseCommon_elide():
|
||||
"""Test the elide function."""
|
||||
|
||||
Reference in New Issue
Block a user