Split up the storage of quote symbols in config
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[Meta]
|
||||
timestamp = 2022-11-10 11:10:10
|
||||
timestamp = 2022-11-11 12:48:18
|
||||
|
||||
[Main]
|
||||
theme = default
|
||||
@@ -46,8 +46,10 @@ repdots = True
|
||||
scrollpastend = 25
|
||||
autoscroll = False
|
||||
autoscrollpos = 30
|
||||
fmtsinglequote = ‘, ’
|
||||
fmtdoublequote = “, ”
|
||||
fmtsquoteopen = ‘
|
||||
fmtsquoteclose = ’
|
||||
fmtdquoteopen = “
|
||||
fmtdquoteclose = ”
|
||||
fmtpadbefore =
|
||||
fmtpadafter =
|
||||
fmtpadthin = False
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[Meta]
|
||||
timestamp = 2022-11-10 11:10:13
|
||||
timestamp = 2022-11-11 12:48:20
|
||||
|
||||
[Main]
|
||||
theme = default
|
||||
@@ -46,8 +46,10 @@ repdots = True
|
||||
scrollpastend = 0
|
||||
autoscroll = True
|
||||
autoscrollpos = 30
|
||||
fmtsinglequote = ‘, ’
|
||||
fmtdoublequote = “, ”
|
||||
fmtsquoteopen = ‘
|
||||
fmtsquoteclose = ’
|
||||
fmtdquoteopen = “
|
||||
fmtdquoteclose = ”
|
||||
fmtpadbefore =
|
||||
fmtpadafter =
|
||||
fmtpadthin = False
|
||||
|
||||
@@ -141,8 +141,10 @@ def testBaseConfig_InitLoadSave(monkeypatch, fncPath, tstPaths):
|
||||
assert newConf.guiSyntax == "bar"
|
||||
|
||||
# Test Correcting Quote Settings
|
||||
tstConf.fmtDoubleQuotes = ["\"", "\""]
|
||||
tstConf.fmtSingleQuotes = ["'", "'"]
|
||||
tstConf.fmtDQuoteOpen = "\""
|
||||
tstConf.fmtDQuoteClose = "\""
|
||||
tstConf.fmtSQuoteOpen = "'"
|
||||
tstConf.fmtSQuoteClose = "'"
|
||||
tstConf.doReplaceDQuote = True
|
||||
tstConf.doReplaceSQuote = True
|
||||
assert tstConf.saveConfig() is True
|
||||
|
||||
@@ -461,19 +461,19 @@ def testGuiMenu_Insert(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockRnd):
|
||||
nwGUI.docEditor.clear()
|
||||
|
||||
nwGUI.mainMenu.aInsQuoteLS.activate(QAction.Trigger)
|
||||
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtSingleQuotes[0]
|
||||
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtSQuoteOpen
|
||||
nwGUI.docEditor.clear()
|
||||
|
||||
nwGUI.mainMenu.aInsQuoteRS.activate(QAction.Trigger)
|
||||
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtSingleQuotes[1]
|
||||
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtSQuoteClose
|
||||
nwGUI.docEditor.clear()
|
||||
|
||||
nwGUI.mainMenu.aInsQuoteLD.activate(QAction.Trigger)
|
||||
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtDoubleQuotes[0]
|
||||
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtDQuoteOpen
|
||||
nwGUI.docEditor.clear()
|
||||
|
||||
nwGUI.mainMenu.aInsQuoteRD.activate(QAction.Trigger)
|
||||
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtDoubleQuotes[1]
|
||||
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtDQuoteClose
|
||||
nwGUI.docEditor.clear()
|
||||
|
||||
nwGUI.mainMenu.aInsMSApos.activate(QAction.Trigger)
|
||||
|
||||
Reference in New Issue
Block a user