Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
513 changes: 155 additions & 358 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ interrupted. One entry per file:
```json
{
"manifest_version": "1.0",
"tool": { "name": "testing-files-generator", "version": "0.4.0" },
"tool": { "name": "testing-files-generator", "version": "0.5.0" },
"run": {
"id": "run_b359aa8d94",
"seed": 0,
Expand Down
Binary file modified cmd/tfg-gui/rsrc_windows_amd64.syso
Binary file not shown.
Binary file modified cmd/tfg/rsrc_windows_amd64.syso
Binary file not shown.
8 changes: 4 additions & 4 deletions cmd/tfg/tfg.rc
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
1 ICON "../../internal/gui/icon/chickpea.ico"

1 VERSIONINFO
FILEVERSION 0,4,0,0
PRODUCTVERSION 0,4,0,0
FILEVERSION 0,5,0,0
PRODUCTVERSION 0,5,0,0
FILEOS 0x40004L
FILETYPE 0x1L
BEGIN
Expand All @@ -50,12 +50,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "DonislawDev"
VALUE "FileDescription", "Generates test files for QA, from the command line"
VALUE "FileVersion", "0.4.0"
VALUE "FileVersion", "0.5.0"
VALUE "InternalName", "tfg"
VALUE "LegalCopyright", "Copyright (C) 2026 DonislawDev. GNU GPL version 3."
VALUE "OriginalFilename", "tfg.exe"
VALUE "ProductName", "Testing Files Generator"
VALUE "ProductVersion", "0.4.0"
VALUE "ProductVersion", "0.5.0"
END
END
BLOCK "VarFileInfo"
Expand Down
113 changes: 113 additions & 0 deletions internal/guard/changelogshape_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"os"
"path/filepath"
"slices"
"strconv"
"strings"
"testing"
)
Expand Down Expand Up @@ -200,6 +201,118 @@ func TestEveryChangelogVersionHasItsLinkDefinition(t *testing.T) {
}
}

// changelogMostWords is how long one entry may be - the owner's decision of
// 2026-10-20, docs/GIT.md §3.
const changelogMostWords = 100

// changelogWordsFrom is the first release held to that ceiling. The sections
// before it were published longer and stay as they were published.
var changelogWordsFrom = []int{0, 5, 0}

// A changelog entry says what is new, how to use it and the one limit a reader
// has to know, in at most a hundred words.
//
// Measured before the owner set the ceiling on 2026-10-20: the 0.5.0 section
// had 40 entries averaging 141 words, the longest 499, and 23 of them over a
// hundred. What made them long was measurement - which reader does what, with
// versions, seconds and gigabytes - and most of it is in the description of the
// setting, which tfg formats and the window show, so the changelog said it
// twice. A word is what sits between spaces, the list marker left out.
//
// Unreleased is held too, so an entry is cut when it is written rather than on
// the day of a release.
func TestEveryChangelogEntryFitsInAHundredWords(t *testing.T) {
raw, err := os.ReadFile(filepath.Join(repoRoot(t), "CHANGELOG.md"))
if err != nil {
t.Fatalf("reading the changelog: %v", err)
}

first, held := 0, 0
for _, e := range changelogEntries(string(raw)) {
if e.section == "0.5.0" {
first++
}
if !changelogHeld(e.section) {
continue
}
held++
if words := len(strings.Fields(e.text)) - 1; words > changelogMostWords {
t.Errorf("CHANGELOG.md line %d, under %s: an entry of %d words, and the ceiling is %d.\n"+
"Reason: docs/GIT.md §3, the owner's decision of 2026-10-20. An entry says what is new,\n"+
"how to use it and the one limit a reader has to know. How each reader behaves, with\n"+
"versions and timings, belongs in the description of the setting.\n"+
"What to do: cut it to the news, the setting or command, and that limit.",
e.line, e.section, words, changelogMostWords)
}
}

// The guard has to reach the entries it holds. 0.5.0 is the first section
// under the ceiling and stays in the file for good, so a reading that finds
// none of its entries, or does not hold them, is reading the wrong thing.
if first == 0 {
t.Fatal("no entry found under 0.5.0, so this guard is not reading the changelog's entries")
}
if held < first {
t.Fatalf("%d entries under 0.5.0 and only %d held to the ceiling, so 0.5.0 is not being held", first, held)
}
}

// changelogEntry is one item of a changelog list, its lines joined.
type changelogEntry struct {
section string
line int
text string
}

// changelogEntries reads every item of every list in the changelog, with the
// section it sits under. An indented line goes on the item before it, after a
// blank line as well, so a second paragraph counts with the first.
func changelogEntries(text string) []changelogEntry {
var out []changelogEntry
section, open, inFence := "", false, false
for i, line := range strings.Split(text, "\n") {
if strings.HasPrefix(line, "```") {
inFence = !inFence
continue
}
switch {
case inFence || strings.TrimSpace(line) == "":
case strings.HasPrefix(line, "## "):
section, _ = bracketed(line[len("## "):])
open = false
case strings.HasPrefix(line, "- "):
out = append(out, changelogEntry{section: section, line: i + 1, text: line})
open = true
case open && strings.HasPrefix(line, " "):
out[len(out)-1].text += " " + line
default:
open = false
}
}
return out
}

// changelogHeld says whether a section is held to the ceiling: Unreleased, and
// every version from changelogWordsFrom on. A heading that does not read as a
// version is held as well, because skipping what it cannot read is how a guard
// goes quiet.
func changelogHeld(section string) bool {
core, _, _ := strings.Cut(section, "-")
parts := strings.Split(core, ".")
if section == "Unreleased" || len(parts) != 3 {
return true
}
version := make([]int, 3)
for i, p := range parts {
n, err := strconv.Atoi(p)
if err != nil {
return true
}
version[i] = n
}
return slices.Compare(version, changelogWordsFrom) >= 0
}

// bracketed reads the name out of a line that opens with a square bracket, and
// says whether there was one to read.
func bracketed(line string) (string, bool) {
Expand Down
18 changes: 16 additions & 2 deletions internal/guard/mutation/entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@
(
"the version in the file properties drifts from the one the program reports",
"internal/version/version.go",
'const Version = "0.4.0"',
'const Version = "0.5.0"',
'const Version = "0.1.0"',
"TestBothBinariesCarryTheirVersionAndAuthor",
),
Expand Down Expand Up @@ -8103,8 +8103,8 @@
(
"Unreleased is left comparing from the release before the newest one",
"CHANGELOG.md",
"[Unreleased]: https://github.com/donislawdev/TestingFilesGenerator/compare/v0.5.0...HEAD",
"[Unreleased]: https://github.com/donislawdev/TestingFilesGenerator/compare/v0.4.0...HEAD",
"[Unreleased]: https://github.com/donislawdev/TestingFilesGenerator/compare/v0.3.0...HEAD",
"TestEveryChangelogVersionHasItsLinkDefinition",
),
(
Expand Down Expand Up @@ -15354,4 +15354,18 @@
"\tcase h.need > 0:\n",
"TestTheArchiveScanLooksIntoTheArchivesInside",
),
(
"a changelog entry grows past a hundred words on a line of its own",
"CHANGELOG.md",
" card of its own with the address written out, for a desktop that opens\n",
" card of its own with the address written out, for a desktop that opens\n word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word\n",
"TestEveryChangelogEntryFitsInAHundredWords",
),
(
"a changelog entry grows past a hundred words in a second paragraph",
"CHANGELOG.md",
" card of its own with the address written out, for a desktop that opens\n nothing.\n",
" card of its own with the address written out, for a desktop that opens\n nothing.\n\n word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word\n",
"TestEveryChangelogEntryFitsInAHundredWords",
),
]
Binary file modified internal/guard/testdata/screens/about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion internal/guard/testdata/screens/about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<container size="788x24">
<widget pos="-6,-6" size="800x36" type="*widget.Label">
<widget size="800x36" type="*widget.RichText">
<text bold pos="6,6" size="285x24" textSize="20">Testing Files Generator 0.4.0</text>
<text bold pos="6,6" size="284x24" textSize="20">Testing Files Generator 0.5.0</text>
</widget>
</widget>
</container>
Expand Down
8 changes: 4 additions & 4 deletions internal/gui/icon/chickpea.rc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
* the fourth number of FILEVERSION is a zero rather than a build counter.
*/
1 VERSIONINFO
FILEVERSION 0,4,0,0
PRODUCTVERSION 0,4,0,0
FILEVERSION 0,5,0,0
PRODUCTVERSION 0,5,0,0
FILEOS 0x40004L
FILETYPE 0x1L
BEGIN
Expand All @@ -49,12 +49,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "DonislawDev"
VALUE "FileDescription", "Generates test files for QA"
VALUE "FileVersion", "0.4.0"
VALUE "FileVersion", "0.5.0"
VALUE "InternalName", "tfg-gui"
VALUE "LegalCopyright", "Copyright (C) 2026 DonislawDev. GNU GPL version 3."
VALUE "OriginalFilename", "tfg-gui.exe"
VALUE "ProductName", "Testing Files Generator"
VALUE "ProductVersion", "0.4.0"
VALUE "ProductVersion", "0.5.0"
END
END
BLOCK "VarFileInfo"
Expand Down
14 changes: 11 additions & 3 deletions internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ package version
// explain a hash mismatch after an upgrade.
//
// Set to 0.1.0 by the owner on 2026-08-02, raised to 0.2.0 on 2026-08-28, to
// 0.3.0-rc1 on 2026-09-03, to 0.3.0 on 2026-09-09 and to 0.4.0 on 2026-09-25,
// every one of them by the owner. It stopped being an internal number the day 0.1.0 was published: this
// 0.3.0-rc1 on 2026-09-03, to 0.3.0 on 2026-09-09, to 0.4.0 on 2026-09-25 and
// to 0.5.0 on 2026-10-20, every one of them by the owner. It stopped being an internal number the day 0.1.0 was published: this
// is what somebody compares their build against when a hash they stored months
// ago does not match.
//
Expand All @@ -26,6 +26,14 @@ package version
// recipe_hash of a run from a preset, because a preset now gives every target
// a purpose, and the changelog says so under Changed.
//
// 0.5.0 moves bytes in one format, and only where the changelog says so under
// Breaking: an HTML page with no label - the smallest one and every page
// written with --clean - carries the title Page where 0.4.0 wrote an empty
// one. The release check generated every format 0.4.0 had at its default
// settings with the published 0.4.0 and with this build, and found none of
// the 26 changed. The settings of html and eml that moved bytes on the way to
// this release were never in one, so they are listed under Added.
//
// The absence of a suffix is a decision rather than tidying up. The release
// workflow marks a release as a prerelease when the TAG NAME carries a hyphen,
// which is what kept 0.3.0-rc1 off the front page and out of "latest" while it
Expand All @@ -37,7 +45,7 @@ package version
// anything. The entries that shipped as 0.3.0-rc1 were folded into the 0.3.0
// section on 2026-09-09 for the same reason the version has one place: someone
// upgrading from 0.2.0 needs one list of what changed, not two.
const Version = "0.4.0"
const Version = "0.5.0"

// LicenceNotice is what "tfg license" prints and what the window's about
// screen shows.
Expand Down
2 changes: 1 addition & 1 deletion web/public/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h1>That page is not here</h1><p class="lead">The address you followed does not
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">Test files for QA, at any exact size, with a manifest that states how your system should react to each one.</p>
</div>
<div class="footer-col">
Expand Down
2 changes: 1 addition & 1 deletion web/public/ar/corrupt-test-files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ <h2>إلى أين من هنا</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
2 changes: 1 addition & 1 deletion web/public/ar/create-file-exact-size/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ <h2>فأيهما تستخدم؟</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
4 changes: 2 additions & 2 deletions web/public/ar/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ <h2>ماذا يوجد في البيان؟</h2>
</p>
<pre><code>{
"manifest_version": "1.0",
"tool": { "name": "testing-files-generator", "version": "0.4.0" },
"tool": { "name": "testing-files-generator", "version": "0.5.0" },
"run": {
"id": "run_b359aa8d94",
"seed": 0,
Expand Down Expand Up @@ -515,7 +515,7 @@ <h2>هل توجد نافذة سطح مكتب؟</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
2 changes: 1 addition & 1 deletion web/public/ar/faq/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ <h2>ما زلت تقرر؟</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
2 changes: 1 addition & 1 deletion web/public/ar/formats/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ <h2>الأرشيفات تحتوي ملفات حقيقية</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
4 changes: 2 additions & 2 deletions web/public/ar/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"applicationCategory": "DeveloperApplication",
"applicationSubCategory": "Software Testing",
"operatingSystem": "Windows, macOS, Linux",
"softwareVersion": "0.4.0",
"softwareVersion": "0.5.0",
"downloadUrl": "https:\/\/github.com\/donislawdev\/TestingFilesGenerator\/releases",
"installUrl": "https:\/\/github.com\/donislawdev\/TestingFilesGenerator\/releases",
"softwareHelp": "https:\/\/github.com\/donislawdev\/TestingFilesGenerator",
Expand Down Expand Up @@ -418,7 +418,7 @@ <h2>اختر الإصدار المناسب لنظامك</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
2 changes: 1 addition & 1 deletion web/public/ar/presets/empty-and-minimal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ <h2>كيف تشغّله؟</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
2 changes: 1 addition & 1 deletion web/public/ar/presets/filename-handling/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ <h2>كيف تشغّله؟</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
2 changes: 1 addition & 1 deletion web/public/ar/presets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ <h2>هل يمكنني الوثوق بالقيم الافتراضية؟</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
2 changes: 1 addition & 1 deletion web/public/ar/presets/size-boundaries/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ <h2>كيف تشغّله؟</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
2 changes: 1 addition & 1 deletion web/public/ar/presets/tabular-import/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ <h2>كيف تشغّله؟</h2>
<footer class="footer">
<div class="wrap footer-inner">
<div class="footer-col">
<p class="footer-brand">Testing Files Generator 0.4.0</p>
<p class="footer-brand">Testing Files Generator 0.5.0</p>
<p class="muted">ملفات اختبار لضمان الجودة بحجم دقيق، مع بيان يحدد كيف يجب أن يتفاعل نظامك مع كل ملف.</p>
</div>
<div class="footer-col">
Expand Down
Loading
Loading