diff --git a/tests/reference/guiEditor_Main_Final_000000000000f.nwd b/tests/reference/guiEditor_Main_Final_000000000000f.nwd index f5402f40..b97e07c1 100644 --- a/tests/reference/guiEditor_Main_Final_000000000000f.nwd +++ b/tests/reference/guiEditor_Main_Final_000000000000f.nwd @@ -1,8 +1,8 @@ %%~name: New Scene %%~path: 000000000000d/000000000000f %%~kind: NOVEL/DOCUMENT -%%~hash: 2a863dc53e09b0b1b0294ae7ea001853dddd596d -%%~date: 2023-10-17 20:52:56/2023-10-17 20:53:01 +%%~hash: 0566024662fb6ed7ed645717addd64dabf058915 +%%~date: 2024-10-27 13:03:13/2024-10-27 13:03:18 # Novel ## Chapter @@ -34,6 +34,10 @@ This is another paragraph of much longer nonsense text. It is in fact 1 very ver Some “ double quoted text with spaces padded ”. +– Hi, I am a character speaking. + +– Hi, I am also a character speaking, – said another character. – How are you? + @object: NoSpaceAdded % synopsis: No space before this colon. diff --git a/tests/reference/guiEditor_Main_Final_nwProject.nwx b/tests/reference/guiEditor_Main_Final_nwProject.nwx index 4c20bd70..55133ebe 100644 --- a/tests/reference/guiEditor_Main_Final_nwProject.nwx +++ b/tests/reference/guiEditor_Main_Final_nwProject.nwx @@ -1,6 +1,6 @@ - - + + New Project Jane Doe @@ -28,7 +28,7 @@ Main - + Novel @@ -46,7 +46,7 @@ New Chapter - + New Scene diff --git a/tests/test_gui/test_gui_guimain.py b/tests/test_gui/test_gui_guimain.py index 33f8187e..f09d885f 100644 --- a/tests/test_gui/test_gui_guimain.py +++ b/tests/test_gui/test_gui_guimain.py @@ -258,7 +258,6 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd): # Syntax Highlighting CONFIG.dialogStyle = 3 CONFIG.dialogLine = "–" - CONFIG.narratorBreak = "–" CONFIG.altDialogOpen = "<|" CONFIG.altDialogClose = "|>" @@ -431,6 +430,9 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd): qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY) qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY) + # Dialogue + # ======== + for c in "\"Full line double quoted text.\"": qtbot.keyClick(docEditor, c, delay=KEY_DELAY) qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY) @@ -453,6 +455,25 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd): docEditor._typPadBefore = "" docEditor._typPadAfter = "" + # Dialogue Line + for c in "-- Hi, I am a character speaking.": + qtbot.keyClick(docEditor, c, delay=KEY_DELAY) + qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY) + qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY) + + # Narrator Break + CONFIG.narratorBreak = "–" + docEditor = nwGUI.docEditor + docEditor._qDocument.syntaxHighlighter.initHighlighter() + + for c in "-- Hi, I am also a character speaking, -- said another character. -- How are you?": + qtbot.keyClick(docEditor, c, delay=KEY_DELAY) + qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY) + qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY) + + # Special Formatting + # ================== + # Insert spaces before colon, but ignore tags and synopsis docEditor._typPadBefore = ":"