Update tests

This commit is contained in:
Veronica Berglyd Olsen
2025-04-29 22:49:22 +02:00
parent bd4a658bd9
commit 67d0b486e9
22 changed files with 263 additions and 143 deletions
+1 -1
View File
@@ -517,7 +517,7 @@ class NWProject:
def updateCounts(self) -> None:
"""Update the total word and character count values."""
wNovel, wNotes, cNovel, cNotes = self._tree.sumWords()
wNovel, wNotes, cNovel, cNotes = self._tree.sumCounts()
self._data.setCurrCounts(wNovel=wNovel, wNotes=wNotes, cNovel=cNovel, cNotes=cNotes)
return
+1 -1
View File
@@ -410,7 +410,7 @@ class NWTree:
return True
def sumWords(self) -> tuple[int, int, int, int]:
def sumCounts(self) -> tuple[int, int, int, int]:
"""Loop over all entries and add up the word and char counts."""
novelWords = 0
notesWords = 0
+3 -3
View File
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="4" timeStamp="2025-04-20 19:01:45">
<project id="e2be99af-f9bf-4403-857a-c3d1ac25abea" saveCount="2178" autoCount="285" editTime="96586">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2025-04-29 22:07:59">
<project id="e2be99af-f9bf-4403-857a-c3d1ac25abea" saveCount="2179" autoCount="285" editTime="96588">
<name>Sample Project</name>
<author>Jane Smith</author>
</project>
@@ -36,7 +36,7 @@
<entry key="i56be10" count="1" red="220" green="138" blue="221" shape="BLOCK_4">Main</entry>
</importance>
</settings>
<content items="31" novelWords="1016" notesWords="416">
<content items="31" novelWords="1016" notesWords="416" novelChars="5602" notesChars="2285">
<item handle="7031beac91f75" parent="None" root="7031beac91f75" order="0" type="ROOT" class="NOVEL">
<meta expanded="yes" />
<name status="sc24b8f" import="ia857f0">Novel</name>
+53 -36
View File
@@ -1,13 +1,13 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.0-rc1" hexVersion="0x020000c1" fileVersion="1.5" fileRevision="4" timeStamp="2022-11-07 13:00:48">
<project id="e2be99af-f9bf-4403-857a-c3d1ac25abea" saveCount="5" autoCount="10" editTime="1000">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2025-04-29 22:07:59">
<project id="e2be99af-f9bf-4403-857a-c3d1ac25abea" saveCount="2179" autoCount="285" editTime="1000">
<name>Sample Project</name>
<author>Jane Smith</author>
</project>
<settings>
<doBackup>yes</doBackup>
<doBackup>no</doBackup>
<language>en_GB</language>
<spellChecking auto="yes">en_GB</spellChecking>
<spellChecking auto="yes">None</spellChecking>
<lastHandle>
<entry key="editor">636b6aa9b697b</entry>
<entry key="viewer">636b6aa9b697b</entry>
@@ -20,32 +20,33 @@
<entry key="C">D</entry>
</autoReplace>
<status>
<entry key="sf12341" count="4" red="100" green="100" blue="100" shape="SQUARE">New</entry>
<entry key="sf12341" count="8" red="100" green="100" blue="100" shape="SQUARE">New</entry>
<entry key="sf24ce6" count="2" red="200" green="50" blue="0" shape="SQUARE">Notes</entry>
<entry key="sc24b8f" count="3" red="182" green="60" blue="0" shape="SQUARE">Started</entry>
<entry key="s90e6c9" count="7" red="193" green="129" blue="0" shape="SQUARE">1st Draft</entry>
<entry key="sd51c5b" count="0" red="193" green="129" blue="0" shape="SQUARE">2nd Draft</entry>
<entry key="s8ae72a" count="0" red="193" green="129" blue="0" shape="SQUARE">3rd Draft</entry>
<entry key="s78ea90" count="1" red="58" green="180" blue="58" shape="SQUARE">Finished</entry>
<entry key="sc24b8f" count="3" red="182" green="60" blue="0" shape="BARS_1">Started</entry>
<entry key="s90e6c9" count="5" red="193" green="129" blue="0" shape="BARS_2">1st Draft</entry>
<entry key="sd51c5b" count="1" red="193" green="129" blue="0" shape="BARS_3">2nd Draft</entry>
<entry key="s8ae72a" count="1" red="193" green="129" blue="0" shape="BARS_4">3rd Draft</entry>
<entry key="s78ea90" count="1" red="58" green="180" blue="58" shape="STAR">Finished</entry>
</status>
<importance>
<entry key="ia857f0" count="5" red="100" green="100" blue="100" shape="SQUARE">None</entry>
<entry key="icfb3a5" count="2" red="0" green="122" blue="188" shape="SQUARE">Minor</entry>
<entry key="i2d7a54" count="2" red="21" green="0" blue="180" shape="SQUARE">Major</entry>
<entry key="i56be10" count="1" red="117" green="0" blue="175" shape="SQUARE">Main</entry>
<entry key="i4a1d39" count="1" red="220" green="138" blue="221" shape="BLOCK_1">Background</entry>
<entry key="icfb3a5" count="1" red="220" green="138" blue="221" shape="BLOCK_2">Minor</entry>
<entry key="i2d7a54" count="2" red="220" green="138" blue="221" shape="BLOCK_3">Major</entry>
<entry key="i56be10" count="1" red="220" green="138" blue="221" shape="BLOCK_4">Main</entry>
</importance>
</settings>
<content items="27" novelWords="954" notesWords="409">
<content items="31" novelWords="1016" notesWords="416" novelChars="5602" notesChars="2285">
<item handle="7031beac91f75" parent="None" root="7031beac91f75" order="0" type="ROOT" class="NOVEL">
<meta expanded="yes" />
<name status="sc24b8f" import="ia857f0">Novel</name>
</item>
<item handle="53b69b83cdafc" parent="7031beac91f75" root="7031beac91f75" order="0" type="FILE" class="NOVEL" layout="DOCUMENT">
<meta expanded="no" heading="H1" charCount="93" wordCount="19" paraCount="2" cursorPos="119" />
<meta expanded="no" heading="H1" charCount="148" wordCount="29" paraCount="4" cursorPos="178" />
<name status="sc24b8f" import="ia857f0" active="yes">Title Page</name>
</item>
<item handle="974e400180a99" parent="7031beac91f75" root="7031beac91f75" order="1" type="FILE" class="NOVEL" layout="DOCUMENT">
<meta expanded="no" heading="H0" charCount="251" wordCount="50" paraCount="2" cursorPos="277" />
<meta expanded="no" heading="H0" charCount="233" wordCount="47" paraCount="2" cursorPos="194" />
<name status="sf12341" import="ia857f0" active="yes">Page</name>
</item>
<item handle="edca4be2fcaf8" parent="7031beac91f75" root="7031beac91f75" order="2" type="FILE" class="NOVEL" layout="DOCUMENT">
@@ -57,28 +58,28 @@
<name status="sf24ce6" import="ia857f0" active="yes">Chapter One</name>
</item>
<item handle="636b6aa9b697b" parent="6a2d6d5f4f401" root="7031beac91f75" order="0" type="FILE" class="NOVEL" layout="DOCUMENT">
<meta expanded="no" heading="H3" charCount="2687" wordCount="479" paraCount="14" cursorPos="67" />
<meta expanded="no" heading="H3" charCount="2999" wordCount="530" paraCount="16" cursorPos="159" />
<name status="s90e6c9" import="ia857f0" active="yes">Making a Scene</name>
</item>
<item handle="bc0cbd2a407f3" parent="6a2d6d5f4f401" root="7031beac91f75" order="1" type="FILE" class="NOVEL" layout="DOCUMENT">
<meta expanded="no" heading="H3" charCount="548" wordCount="108" paraCount="3" cursorPos="465" />
<meta expanded="no" heading="H3" charCount="548" wordCount="108" paraCount="3" cursorPos="650" />
<name status="s90e6c9" import="ia857f0" active="yes">Another Scene</name>
</item>
<item handle="ba8a28a246524" parent="7031beac91f75" root="7031beac91f75" order="4" type="FILE" class="NOVEL" layout="DOCUMENT">
<meta expanded="no" heading="H2" charCount="617" wordCount="101" paraCount="3" cursorPos="310" />
<meta expanded="no" heading="H2" charCount="617" wordCount="101" paraCount="3" cursorPos="1182" />
<name status="s78ea90" import="ia857f0" active="yes">Interlude</name>
</item>
<item handle="96b68994dfa3d" parent="7031beac91f75" root="7031beac91f75" order="5" type="FILE" class="NOVEL" layout="NOTE">
<meta expanded="no" heading="H1" charCount="1909" wordCount="346" paraCount="7" cursorPos="0" />
<meta expanded="no" heading="H1" charCount="1909" wordCount="346" paraCount="7" cursorPos="1940" />
<name status="sf24ce6" import="ia857f0" active="no">A Note on Structure</name>
</item>
<item handle="88706ddc78b1b" parent="7031beac91f75" root="7031beac91f75" order="6" type="FILE" class="NOVEL" layout="DOCUMENT">
<meta expanded="yes" heading="H2" charCount="139" wordCount="28" paraCount="1" cursorPos="188" />
<meta expanded="yes" heading="H2" charCount="139" wordCount="28" paraCount="1" cursorPos="356" />
<name status="s90e6c9" import="ia857f0" active="yes">Chapter Two</name>
</item>
<item handle="ae7339df26ded" parent="88706ddc78b1b" root="7031beac91f75" order="0" type="FILE" class="NOVEL" layout="DOCUMENT">
<meta expanded="no" heading="H3" charCount="189" wordCount="37" paraCount="1" cursorPos="0" />
<name status="s90e6c9" import="ia857f0" active="yes">We Found John!</name>
<meta expanded="no" heading="H3" charCount="189" wordCount="37" paraCount="1" cursorPos="237" />
<name status="sd51c5b" import="ia857f0" active="yes">We Found John!</name>
</item>
<item handle="e5e47ebf63b1c" parent="None" root="e5e47ebf63b1c" order="1" type="ROOT" class="NOVEL">
<meta expanded="yes" />
@@ -89,8 +90,8 @@
<name status="sc24b8f" import="ia857f0" active="yes">Title Page</name>
</item>
<item handle="a520879ca0b45" parent="e5e47ebf63b1c" root="e5e47ebf63b1c" order="1" type="FILE" class="NOVEL" layout="DOCUMENT">
<meta expanded="no" heading="H2" charCount="299" wordCount="55" paraCount="2" cursorPos="104" />
<name status="s90e6c9" import="ia857f0" active="yes">Chapter One</name>
<meta expanded="no" heading="H2" charCount="299" wordCount="55" paraCount="2" cursorPos="387" />
<name status="s8ae72a" import="ia857f0" active="yes">Chapter One</name>
</item>
<item handle="f6622b4617424" parent="None" root="f6622b4617424" order="2" type="ROOT" class="CHARACTER">
<meta expanded="yes" />
@@ -101,28 +102,28 @@
<name status="sf12341" import="ia857f0">Main Characters</name>
</item>
<item handle="14298de4d9524" parent="f7e2d9f330615" root="f6622b4617424" order="0" type="FILE" class="CHARACTER" layout="NOTE">
<meta expanded="no" heading="H1" charCount="49" wordCount="9" paraCount="1" cursorPos="24" />
<name status="sf12341" import="icfb3a5" active="yes">John Smith</name>
<meta expanded="no" heading="H1" charCount="49" wordCount="9" paraCount="1" cursorPos="23" />
<name status="sf12341" import="i2d7a54" active="yes">John Smith</name>
</item>
<item handle="bb2c23b3c42cc" parent="f7e2d9f330615" root="f6622b4617424" order="1" type="FILE" class="CHARACTER" layout="NOTE">
<meta expanded="no" heading="H1" charCount="55" wordCount="9" paraCount="1" cursorPos="25" />
<name status="sf12341" import="i2d7a54" active="yes">Jane Smith</name>
<meta expanded="no" heading="H1" charCount="55" wordCount="9" paraCount="1" cursorPos="31" />
<name status="sf12341" import="i56be10" active="yes">Jane Smith</name>
</item>
<item handle="15c4492bd5107" parent="None" root="15c4492bd5107" order="3" type="ROOT" class="WORLD">
<meta expanded="yes" />
<name status="sf12341" import="ia857f0">Locations</name>
</item>
<item handle="b3e74dbc1f584" parent="15c4492bd5107" root="15c4492bd5107" order="0" type="FILE" class="WORLD" layout="NOTE">
<meta expanded="no" heading="H1" charCount="76" wordCount="15" paraCount="1" cursorPos="20" />
<name status="sf12341" import="i56be10" active="yes">Earth</name>
<meta expanded="no" heading="H1" charCount="76" wordCount="15" paraCount="1" cursorPos="111" />
<name status="sf12341" import="i2d7a54" active="yes">Earth</name>
</item>
<item handle="f1471bef9f2ae" parent="15c4492bd5107" root="15c4492bd5107" order="1" type="FILE" class="WORLD" layout="NOTE">
<meta expanded="no" heading="H1" charCount="115" wordCount="24" paraCount="1" cursorPos="133" />
<name status="sf12341" import="icfb3a5" active="yes">Space</name>
<meta expanded="no" heading="H1" charCount="115" wordCount="24" paraCount="1" cursorPos="0" />
<name status="sf12341" import="i4a1d39" active="yes">Space</name>
</item>
<item handle="5eaea4e8cdee8" parent="15c4492bd5107" root="15c4492bd5107" order="2" type="FILE" class="WORLD" layout="NOTE">
<meta expanded="no" heading="H1" charCount="28" wordCount="6" paraCount="1" cursorPos="45" />
<name status="sf12341" import="i2d7a54" active="yes">Mars</name>
<meta expanded="no" heading="H1" charCount="28" wordCount="6" paraCount="1" cursorPos="62" />
<name status="sf12341" import="icfb3a5" active="yes">Mars</name>
</item>
<item handle="6827118336ac1" parent="None" root="6827118336ac1" order="4" type="ROOT" class="ARCHIVE">
<meta expanded="yes" />
@@ -136,7 +137,23 @@
<meta expanded="no" heading="H3" charCount="232" wordCount="42" paraCount="1" cursorPos="239" />
<name status="s90e6c9" import="ia857f0" active="yes">Old File</name>
</item>
<item handle="98acd8c76c93a" parent="None" root="98acd8c76c93a" order="5" type="ROOT" class="TRASH">
<item handle="f4ed1ae756a1f" parent="None" root="f4ed1ae756a1f" order="5" type="ROOT" class="TEMPLATE">
<meta expanded="yes" />
<name status="sf12341" import="ia857f0">Templates</name>
</item>
<item handle="5aec885635c85" parent="f4ed1ae756a1f" root="f4ed1ae756a1f" order="0" type="FILE" class="TEMPLATE" layout="DOCUMENT">
<meta expanded="no" heading="H3" charCount="9" wordCount="2" paraCount="1" cursorPos="78" />
<name status="sf12341" import="ia857f0" active="yes">Scene</name>
</item>
<item handle="2a60782759c6f" parent="f4ed1ae756a1f" root="f4ed1ae756a1f" order="1" type="FILE" class="TEMPLATE" layout="DOCUMENT">
<meta expanded="no" heading="H2" charCount="11" wordCount="2" paraCount="1" cursorPos="81" />
<name status="sf12341" import="ia857f0" active="yes">Chapter</name>
</item>
<item handle="5ee8aebcdebc9" parent="f4ed1ae756a1f" root="f4ed1ae756a1f" order="2" type="FILE" class="TEMPLATE" layout="NOTE">
<meta expanded="no" heading="H1" charCount="53" wordCount="7" paraCount="1" cursorPos="75" />
<name status="sf12341" import="ia857f0" active="yes">Character Note</name>
</item>
<item handle="98acd8c76c93a" parent="None" root="98acd8c76c93a" order="6" type="ROOT" class="TRASH">
<meta expanded="yes" />
<name status="sf12341" import="ia857f0">Trash</name>
</item>
+4 -4
View File
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.6b1" hexVersion="0x020600b1" fileVersion="1.5" fileRevision="4" timeStamp="2024-11-20 19:22:22">
<project id="5ac0df12-8b8b-476b-9905-21d33685687c" saveCount="51" autoCount="29" editTime="2456">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2025-04-29 22:45:09">
<project id="5ac0df12-8b8b-476b-9905-21d33685687c" saveCount="52" autoCount="29" editTime="2465">
<name>Lorem Ipsum</name>
<author>lipsum.com</author>
</project>
@@ -31,7 +31,7 @@
<entry key="id6b1d0" count="0" red="50" green="200" blue="0" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="22" novelWords="3115" notesWords="738">
<content items="22" novelWords="3115" notesWords="738" novelChars="20774" notesChars="5003">
<item handle="b3643d0f92e32" parent="None" root="b3643d0f92e32" order="0" type="ROOT" class="NOVEL">
<meta expanded="yes" />
<name status="sbaa94f" import="i613591">Novel</name>
@@ -116,7 +116,7 @@
<meta expanded="no" heading="H1" charCount="1770" wordCount="259" paraCount="3" cursorPos="47" />
<name status="sbaa94f" import="i613591" active="yes">Ancient Europe</name>
</item>
<item handle="1ace7ab1a0fc6" parent="None" root="1ace7ab1a0fc6" order="0" type="ROOT" class="TRASH">
<item handle="1ace7ab1a0fc6" parent="None" root="1ace7ab1a0fc6" order="4" type="ROOT" class="TRASH">
<meta expanded="no" />
<name status="sbaa94f" import="i613591">Trash</name>
</item>
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.6b1" hexVersion="0x020600b1" fileVersion="1.5" fileRevision="4" timeStamp="2024-11-23 23:32:55">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2025-04-29 22:42:54">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="1" editTime="0">
<name>New Project</name>
<author>Jane Doe</author>
@@ -28,7 +28,7 @@
<entry key="i000007" count="0" red="50" green="200" blue="0" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="12" novelWords="10" notesWords="6">
<content items="12" novelWords="10" notesWords="6" novelChars="45" notesChars="22">
<item handle="0000000000008" parent="None" root="0000000000008" order="0" type="ROOT" class="NOVEL">
<meta expanded="no" />
<name status="s000000" import="i000004">Novel</name>
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.6b1" hexVersion="0x020600b1" fileVersion="1.5" fileRevision="4" timeStamp="2024-11-23 23:32:55">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2025-04-29 22:42:54">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="1" editTime="0">
<name>New Project</name>
<author>Jane Doe</author>
@@ -28,7 +28,7 @@
<entry key="i000007" count="0" red="50" green="200" blue="0" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="16" novelWords="9" notesWords="0">
<content items="16" novelWords="9" notesWords="0" novelChars="40" notesChars="0">
<item handle="0000000000008" parent="None" root="0000000000008" order="0" type="ROOT" class="NOVEL">
<meta expanded="no" />
<name status="s000000" import="i000004">Novel</name>
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.6b1" hexVersion="0x020600b1" fileVersion="1.5" fileRevision="4" timeStamp="2024-11-23 23:37:19">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2025-04-29 22:42:52">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="1" editTime="0">
<name>New Project</name>
<author>Jane Doe</author>
@@ -28,7 +28,7 @@
<entry key="i000007" count="0" red="50" green="200" blue="0" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="19" novelWords="28" notesWords="0">
<content items="19" novelWords="28" notesWords="0" novelChars="129" notesChars="0">
<item handle="0000000000008" parent="None" root="0000000000008" order="0" type="ROOT" class="NOVEL">
<meta expanded="no" />
<name status="s000000" import="i000004">Novel</name>
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.6b1" hexVersion="0x020600b1" fileVersion="1.5" fileRevision="4" timeStamp="2024-11-23 19:07:52">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2025-04-29 22:42:52">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="0" editTime="0">
<name>Test Project A</name>
<author>Jane Doe</author>
@@ -28,7 +28,7 @@
<entry key="i000007" count="0" red="50" green="200" blue="0" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="22" novelWords="0" notesWords="0">
<content items="22" novelWords="0" notesWords="0" novelChars="0" notesChars="0">
<item handle="0000000000008" parent="None" root="0000000000008" order="0" type="ROOT" class="NOVEL">
<meta expanded="no" />
<name status="s000000" import="i000004">Novel</name>
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.6b1" hexVersion="0x020600b1" fileVersion="1.5" fileRevision="4" timeStamp="2024-11-23 19:07:13">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2025-04-29 22:42:52">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="0" editTime="0">
<name>Test Project B</name>
<author>Jane Doe</author>
@@ -28,7 +28,7 @@
<entry key="i000007" count="0" red="50" green="200" blue="0" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="16" novelWords="0" notesWords="0">
<content items="16" novelWords="0" notesWords="0" novelChars="0" notesChars="0">
<item handle="0000000000008" parent="None" root="0000000000008" order="0" type="ROOT" class="NOVEL">
<meta expanded="no" />
<name status="s000000" import="i000004">Novel</name>
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<ns0:Properties xmlns:ns0="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
<ns0:TotalTime>40</ns0:TotalTime>
<ns0:Application>novelWriter/2.6a3</ns0:Application>
<ns0:TotalTime>41</ns0:TotalTime>
<ns0:Application>novelWriter/2.7b1</ns0:Application>
<ns0:Words>4035</ns0:Words>
<ns0:Characters>21296</ns0:Characters>
<ns0:CharactersWithSpaces>24964</ns0:CharactersWithSpaces>
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='utf-8'?>
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<dcterms:created xsi:type="dcterms:W3CDTF">2024-11-20T19:45:15</dcterms:created>
<dcterms:modified xsi:type="dcterms:W3CDTF">2024-11-20T19:45:15</dcterms:modified>
<dcterms:created xsi:type="dcterms:W3CDTF">2025-04-29T22:46:36</dcterms:created>
<dcterms:modified xsi:type="dcterms:W3CDTF">2025-04-29T22:46:36</dcterms:modified>
<dc:creator>lipsum.com</dc:creator>
<dc:title>Lorem Ipsum</dc:title>
<dc:language>en_GB</dc:language>
<cp:revision>51</cp:revision>
<cp:revision>52</cp:revision>
<cp:lastModifiedBy>lipsum.com</cp:lastModifiedBy>
</cp:coreProperties>
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.7a3" hexVersion="0x020700a3" fileVersion="1.5" fileRevision="4" timeStamp="2025-03-30 23:23:22">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="3" autoCount="2" editTime="5">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2025-04-29 22:08:41">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="3" autoCount="2" editTime="4">
<name>New Project</name>
<author>Jane Doe</author>
</project>
@@ -28,7 +28,7 @@
<entry key="i000007" count="0" red="50" green="200" blue="0" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="12" novelWords="173" notesWords="27">
<content items="12" novelWords="173" notesWords="27" novelChars="1007" notesChars="133">
<item handle="0000000000008" parent="None" root="0000000000008" order="0" type="ROOT" class="NOVEL">
<meta expanded="yes" />
<name status="s000000" import="i000004">Novel</name>
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.7a3" hexVersion="0x020700a3" fileVersion="1.5" fileRevision="4" timeStamp="2025-03-23 22:33:54">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2025-04-29 22:01:24">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="2" autoCount="1" editTime="0">
<name>New Project</name>
<author>Jane Doe</author>
@@ -28,7 +28,7 @@
<entry key="i000007" count="0" red="50" green="200" blue="0" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="8" novelWords="9" notesWords="0">
<content items="8" novelWords="9" notesWords="0" novelChars="40" notesChars="0">
<item handle="0000000000008" parent="None" root="0000000000008" order="0" type="ROOT" class="NOVEL">
<meta expanded="no" />
<name status="s000000" import="i000004">Novel</name>
+130 -30
View File
@@ -38,10 +38,10 @@
"metaAttr": {
"expanded": false,
"heading": "H1",
"charCount": 93,
"wordCount": 19,
"paraCount": 2,
"cursorPos": 119
"charCount": 148,
"wordCount": 29,
"paraCount": 4,
"cursorPos": 178
},
"nameAttr": {
"status": "sc24b8f",
@@ -63,10 +63,10 @@
"metaAttr": {
"expanded": false,
"heading": "H0",
"charCount": 251,
"wordCount": 50,
"charCount": 233,
"wordCount": 47,
"paraCount": 2,
"cursorPos": 277
"cursorPos": 194
},
"nameAttr": {
"status": "sf12341",
@@ -138,10 +138,10 @@
"metaAttr": {
"expanded": false,
"heading": "H3",
"charCount": 2687,
"wordCount": 479,
"paraCount": 14,
"cursorPos": 67
"charCount": 2999,
"wordCount": 530,
"paraCount": 16,
"cursorPos": 159
},
"nameAttr": {
"status": "s90e6c9",
@@ -166,7 +166,7 @@
"charCount": 548,
"wordCount": 108,
"paraCount": 3,
"cursorPos": 465
"cursorPos": 650
},
"nameAttr": {
"status": "s90e6c9",
@@ -191,7 +191,7 @@
"charCount": 617,
"wordCount": 101,
"paraCount": 3,
"cursorPos": 310
"cursorPos": 1182
},
"nameAttr": {
"status": "s78ea90",
@@ -216,7 +216,7 @@
"charCount": 1909,
"wordCount": 346,
"paraCount": 7,
"cursorPos": 0
"cursorPos": 1940
},
"nameAttr": {
"status": "sf24ce6",
@@ -241,7 +241,7 @@
"charCount": 139,
"wordCount": 28,
"paraCount": 1,
"cursorPos": 188
"cursorPos": 356
},
"nameAttr": {
"status": "s90e6c9",
@@ -266,10 +266,10 @@
"charCount": 189,
"wordCount": 37,
"paraCount": 1,
"cursorPos": 0
"cursorPos": 237
},
"nameAttr": {
"status": "s90e6c9",
"status": "sd51c5b",
"import": "ia857f0",
"active": true
}
@@ -341,10 +341,10 @@
"charCount": 299,
"wordCount": 55,
"paraCount": 2,
"cursorPos": 104
"cursorPos": 387
},
"nameAttr": {
"status": "s90e6c9",
"status": "s8ae72a",
"import": "ia857f0",
"active": true
}
@@ -416,11 +416,11 @@
"charCount": 49,
"wordCount": 9,
"paraCount": 1,
"cursorPos": 24
"cursorPos": 23
},
"nameAttr": {
"status": "sf12341",
"import": "icfb3a5",
"import": "i2d7a54",
"active": true
}
},
@@ -441,11 +441,11 @@
"charCount": 55,
"wordCount": 9,
"paraCount": 1,
"cursorPos": 25
"cursorPos": 31
},
"nameAttr": {
"status": "sf12341",
"import": "i2d7a54",
"import": "i56be10",
"active": true
}
},
@@ -491,11 +491,11 @@
"charCount": 76,
"wordCount": 15,
"paraCount": 1,
"cursorPos": 20
"cursorPos": 111
},
"nameAttr": {
"status": "sf12341",
"import": "i56be10",
"import": "i2d7a54",
"active": true
}
},
@@ -516,11 +516,11 @@
"charCount": 115,
"wordCount": 24,
"paraCount": 1,
"cursorPos": 133
"cursorPos": 0
},
"nameAttr": {
"status": "sf12341",
"import": "icfb3a5",
"import": "i4a1d39",
"active": true
}
},
@@ -541,11 +541,11 @@
"charCount": 28,
"wordCount": 6,
"paraCount": 1,
"cursorPos": 45
"cursorPos": 62
},
"nameAttr": {
"status": "sf12341",
"import": "i2d7a54",
"import": "icfb3a5",
"active": true
}
},
@@ -624,13 +624,113 @@
"active": true
}
},
{
"name": "Templates",
"itemAttr": {
"handle": "f4ed1ae756a1f",
"parent": null,
"root": "f4ed1ae756a1f",
"order": 5,
"type": "ROOT",
"class": "TEMPLATE",
"layout": "NO_LAYOUT"
},
"metaAttr": {
"expanded": true,
"heading": "H0",
"charCount": 0,
"wordCount": 0,
"paraCount": 0,
"cursorPos": 0
},
"nameAttr": {
"status": "sf12341",
"import": "ia857f0",
"active": false
}
},
{
"name": "Scene",
"itemAttr": {
"handle": "5aec885635c85",
"parent": "f4ed1ae756a1f",
"root": "f4ed1ae756a1f",
"order": 0,
"type": "FILE",
"class": "TEMPLATE",
"layout": "DOCUMENT"
},
"metaAttr": {
"expanded": false,
"heading": "H3",
"charCount": 9,
"wordCount": 2,
"paraCount": 1,
"cursorPos": 78
},
"nameAttr": {
"status": "sf12341",
"import": "ia857f0",
"active": true
}
},
{
"name": "Chapter",
"itemAttr": {
"handle": "2a60782759c6f",
"parent": "f4ed1ae756a1f",
"root": "f4ed1ae756a1f",
"order": 1,
"type": "FILE",
"class": "TEMPLATE",
"layout": "DOCUMENT"
},
"metaAttr": {
"expanded": false,
"heading": "H2",
"charCount": 11,
"wordCount": 2,
"paraCount": 1,
"cursorPos": 81
},
"nameAttr": {
"status": "sf12341",
"import": "ia857f0",
"active": true
}
},
{
"name": "Character Note",
"itemAttr": {
"handle": "5ee8aebcdebc9",
"parent": "f4ed1ae756a1f",
"root": "f4ed1ae756a1f",
"order": 2,
"type": "FILE",
"class": "TEMPLATE",
"layout": "NOTE"
},
"metaAttr": {
"expanded": false,
"heading": "H1",
"charCount": 53,
"wordCount": 7,
"paraCount": 1,
"cursorPos": 75
},
"nameAttr": {
"status": "sf12341",
"import": "ia857f0",
"active": true
}
},
{
"name": "Trash",
"itemAttr": {
"handle": "98acd8c76c93a",
"parent": null,
"root": "98acd8c76c93a",
"order": 5,
"order": 6,
"type": "ROOT",
"class": "TRASH",
"layout": "NO_LAYOUT"
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.0-rc1" hexVersion="0x020000c1" fileVersion="1.5" fileRevision="4" timeStamp="2020-05-28 09:59:15">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2020-05-28 09:59:15">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="0" autoCount="0" editTime="1000">
<name>Sample Project</name>
<author>Jay Doh</author>
@@ -35,7 +35,7 @@
<entry key="i00000a" count="0" red="117" green="0" blue="175" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="22" novelWords="0" notesWords="0">
<content items="22" novelWords="0" notesWords="0" novelChars="0" notesChars="0">
<item handle="7031beac91f75" parent="None" root="7031beac91f75" order="0" type="ROOT" class="NOVEL">
<meta expanded="yes" />
<name status="s000002" import="i000007">Novel</name>
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.0-rc1" hexVersion="0x020000c1" fileVersion="1.5" fileRevision="4" timeStamp="2020-06-26 21:20:24">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2020-06-26 21:20:24">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
<name>Sample Project</name>
<author>Jay Doh</author>
@@ -35,7 +35,7 @@
<entry key="i00000a" count="0" red="117" green="0" blue="175" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="22" novelWords="0" notesWords="0">
<content items="22" novelWords="0" notesWords="0" novelChars="0" notesChars="0">
<item handle="7031beac91f75" parent="None" root="7031beac91f75" order="0" type="ROOT" class="NOVEL">
<meta expanded="yes" />
<name status="s000002" import="i000007">Novel</name>
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.0-rc1" hexVersion="0x020000c1" fileVersion="1.5" fileRevision="4" timeStamp="2021-08-30 23:33:44">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2021-08-30 23:33:44">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
<name>Sample Project</name>
<author>Jay Doh</author>
@@ -35,7 +35,7 @@
<entry key="i00000a" count="0" red="117" green="0" blue="175" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="25" novelWords="840" notesWords="376">
<content items="25" novelWords="840" notesWords="376" novelChars="0" notesChars="0">
<item handle="7031beac91f75" parent="None" root="7031beac91f75" order="0" type="ROOT" class="NOVEL">
<meta expanded="yes" />
<name status="s000002" import="i000007">Novel</name>
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.0-rc1" hexVersion="0x020000c1" fileVersion="1.5" fileRevision="4" timeStamp="2022-10-25 18:26:15">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2022-10-25 18:26:15">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
<name>Sample Project</name>
<author>Jay Doh</author>
@@ -35,7 +35,7 @@
<entry key="i00000a" count="0" red="117" green="0" blue="175" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="25" novelWords="830" notesWords="376">
<content items="25" novelWords="830" notesWords="376" novelChars="0" notesChars="0">
<item handle="7031beac91f75" parent="None" root="7031beac91f75" order="0" type="ROOT" class="NOVEL">
<meta expanded="yes" />
<name status="s000002" import="i000007">Novel</name>
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.0-rc1" hexVersion="0x020000c1" fileVersion="1.5" fileRevision="4" timeStamp="2022-10-15 12:12:59">
<novelWriterXML appVersion="2.7b1" hexVersion="0x020700b1" fileVersion="1.5" fileRevision="5" timeStamp="2022-10-15 12:12:59">
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
<name>Sample Project</name>
<author>Jay Doh</author>
@@ -35,7 +35,7 @@
<entry key="i56be10" count="1" red="117" green="0" blue="175" shape="SQUARE">Main</entry>
</importance>
</settings>
<content items="27" novelWords="954" notesWords="409">
<content items="27" novelWords="954" notesWords="409" novelChars="0" notesChars="0">
<item handle="7031beac91f75" parent="None" root="7031beac91f75" order="0" type="ROOT" class="NOVEL">
<meta expanded="yes" />
<name status="sc24b8f" import="ia857f0">Novel</name>
+40 -37
View File
@@ -52,8 +52,8 @@ class MockProject:
@pytest.fixture(scope="function", autouse=True)
def mockVersion(monkeypatch):
"""Mock the version info to prevent diff from failing."""
monkeypatch.setattr("novelwriter.core.projectxml.__version__", "2.0-rc1")
monkeypatch.setattr("novelwriter.core.projectxml.__hexversion__", "0x020000c1")
monkeypatch.setattr("novelwriter.core.projectxml.__version__", "2.7b1")
monkeypatch.setattr("novelwriter.core.projectxml.__hexversion__", "0x020700b1")
return
@@ -137,23 +137,23 @@ def testCoreProjectXML_ReadCurrent(monkeypatch, mockGUI, tstPaths, fncPath):
assert xmlReader.state == XMLReadState.PARSED_OK
assert xmlReader.xmlRoot == "novelWriterXML"
assert xmlReader.xmlVersion == 0x0105
assert xmlReader.xmlRevision == 4
assert xmlReader.appVersion == "2.0-rc1"
assert xmlReader.hexVersion == 0x020000c1
assert xmlReader.xmlRevision == 5
assert xmlReader.appVersion == "2.7b1"
assert xmlReader.hexVersion == 0x020700b1
# Check loaded data
assert data.name == "Sample Project"
assert data.author == "Jane Smith"
assert data.saveCount == 5
assert data.autoCount == 10
assert data.saveCount == 2179
assert data.autoCount == 285
assert data.editTime == 1000
assert data.doBackup is True
assert data.doBackup is False
assert data.language == "en_GB"
assert data.spellCheck is True
assert data.spellLang == "en_GB"
assert data.initCounts == (954, 409)
assert data.currCounts == (954, 409)
assert data.spellLang is None
assert data.initCounts == (1016, 416, 5602, 2285)
assert data.currCounts == (1016, 416, 5602, 2285)
assert data.getLastHandle("editor") == "636b6aa9b697b"
assert data.getLastHandle("viewer") == "636b6aa9b697b"
@@ -182,33 +182,36 @@ def testCoreProjectXML_ReadCurrent(monkeypatch, mockGUI, tstPaths, fncPath):
assert data.itemStatus["s78ea90"].color == QColor(58, 180, 58)
assert data.itemImport["ia857f0"].color == QColor(100, 100, 100)
assert data.itemImport["icfb3a5"].color == QColor(0, 122, 188)
assert data.itemImport["i2d7a54"].color == QColor(21, 0, 180)
assert data.itemImport["i56be10"].color == QColor(117, 0, 175)
assert data.itemImport["i4a1d39"].color == QColor(220, 138, 221)
assert data.itemImport["icfb3a5"].color == QColor(220, 138, 221)
assert data.itemImport["i2d7a54"].color == QColor(220, 138, 221)
assert data.itemImport["i56be10"].color == QColor(220, 138, 221)
assert data.itemStatus["sf12341"].shape == nwStatusShape.SQUARE
assert data.itemStatus["sf24ce6"].shape == nwStatusShape.SQUARE
assert data.itemStatus["sc24b8f"].shape == nwStatusShape.SQUARE
assert data.itemStatus["s90e6c9"].shape == nwStatusShape.SQUARE
assert data.itemStatus["sd51c5b"].shape == nwStatusShape.SQUARE
assert data.itemStatus["s8ae72a"].shape == nwStatusShape.SQUARE
assert data.itemStatus["s78ea90"].shape == nwStatusShape.SQUARE
assert data.itemStatus["sc24b8f"].shape == nwStatusShape.BARS_1
assert data.itemStatus["s90e6c9"].shape == nwStatusShape.BARS_2
assert data.itemStatus["sd51c5b"].shape == nwStatusShape.BARS_3
assert data.itemStatus["s8ae72a"].shape == nwStatusShape.BARS_4
assert data.itemStatus["s78ea90"].shape == nwStatusShape.STAR
assert data.itemImport["ia857f0"].shape == nwStatusShape.SQUARE
assert data.itemImport["icfb3a5"].shape == nwStatusShape.SQUARE
assert data.itemImport["i2d7a54"].shape == nwStatusShape.SQUARE
assert data.itemImport["i56be10"].shape == nwStatusShape.SQUARE
assert data.itemImport["i4a1d39"].shape == nwStatusShape.BLOCK_1
assert data.itemImport["icfb3a5"].shape == nwStatusShape.BLOCK_2
assert data.itemImport["i2d7a54"].shape == nwStatusShape.BLOCK_3
assert data.itemImport["i56be10"].shape == nwStatusShape.BLOCK_4
assert data.itemStatus["sf12341"].count == 4
assert data.itemStatus["sf12341"].count == 8
assert data.itemStatus["sf24ce6"].count == 2
assert data.itemStatus["sc24b8f"].count == 3
assert data.itemStatus["s90e6c9"].count == 7
assert data.itemStatus["sd51c5b"].count == 0
assert data.itemStatus["s8ae72a"].count == 0
assert data.itemStatus["s90e6c9"].count == 5
assert data.itemStatus["sd51c5b"].count == 1
assert data.itemStatus["s8ae72a"].count == 1
assert data.itemStatus["s78ea90"].count == 1
assert data.itemImport["ia857f0"].count == 5
assert data.itemImport["icfb3a5"].count == 2
assert data.itemImport["i4a1d39"].count == 1
assert data.itemImport["icfb3a5"].count == 1
assert data.itemImport["i2d7a54"].count == 2
assert data.itemImport["i56be10"].count == 1
@@ -281,8 +284,8 @@ def testCoreProjectXML_ReadLegacy10(tstPaths, fncPath, mockGUI, mockRnd):
assert data.language is None # Doesn't exist in 1.0
assert data.spellCheck is True
assert data.spellLang is None # Doesn't exist in 1.0
assert data.initCounts == (0, 0)
assert data.currCounts == (0, 0)
assert data.initCounts == (0, 0, 0, 0)
assert data.currCounts == (0, 0, 0, 0)
assert data.getLastHandle("editor") is None # Dropped by conversion
assert data.getLastHandle("viewer") is None # Dropped by conversion
@@ -426,8 +429,8 @@ def testCoreProjectXML_ReadLegacy11(tstPaths, fncPath, mockGUI, mockRnd):
assert data.language is None # Doesn't exist in 1.1
assert data.spellCheck is True
assert data.spellLang is None # Doesn't exist in 1.1
assert data.initCounts == (0, 0)
assert data.currCounts == (0, 0)
assert data.initCounts == (0, 0, 0, 0)
assert data.currCounts == (0, 0, 0, 0)
assert data.getLastHandle("editor") is None # Dropped by conversion
assert data.getLastHandle("viewer") is None # Dropped by conversion
@@ -571,8 +574,8 @@ def testCoreProjectXML_ReadLegacy12(tstPaths, fncPath, mockGUI, mockRnd):
assert data.language == "en_GB"
assert data.spellCheck is True
assert data.spellLang == "en_GB"
assert data.initCounts == (840, 376)
assert data.currCounts == (840, 376)
assert data.initCounts == (840, 376, 0, 0)
assert data.currCounts == (840, 376, 0, 0)
assert data.getLastHandle("editor") is None # Dropped by conversion
assert data.getLastHandle("viewer") is None # Dropped by conversion
@@ -719,8 +722,8 @@ def testCoreProjectXML_ReadLegacy13(tstPaths, fncPath, mockGUI, mockRnd):
assert data.language == "en_GB"
assert data.spellCheck is True
assert data.spellLang == "en_GB"
assert data.initCounts == (830, 376)
assert data.currCounts == (830, 376)
assert data.initCounts == (830, 376, 0, 0)
assert data.currCounts == (830, 376, 0, 0)
assert data.getLastHandle("editor") is None # Dropped by conversion
assert data.getLastHandle("viewer") is None # Dropped by conversion
@@ -867,8 +870,8 @@ def testCoreProjectXML_ReadLegacy14(tstPaths, fncPath, mockGUI, mockRnd):
assert data.language == "en_GB"
assert data.spellCheck is True
assert data.spellLang == "en_GB"
assert data.initCounts == (954, 409)
assert data.currCounts == (954, 409)
assert data.initCounts == (954, 409, 0, 0)
assert data.currCounts == (954, 409, 0, 0)
assert data.getLastHandle("editor") is None # Dropped by conversion
assert data.getLastHandle("viewer") is None # Dropped by conversion
+1 -1
View File
@@ -436,7 +436,7 @@ def testCoreTree_OtherMethods(qtbot, monkeypatch, mockGUI, fncPath, mockRnd):
]
# Refresh All
assert tree.sumWords() == (9, 0)
assert tree.sumCounts() == (9, 0, 40, 0)
assert tree.model.root.count == 9
for node in tree.nodes.values():