summaryrefslogtreecommitdiff
path: root/internal/processor/markdown_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-27 08:27:28 +0300
committerPaul Buetow <paul@buetow.org>2026-04-27 08:27:28 +0300
commit8b37e6e04035f9f8a3d01701dae121cdc67cbf43 (patch)
treecc9b7ddbadbb401eb957c38cac96b5819e503dda /internal/processor/markdown_test.go
parentf8f17653e66bd2cd90c6a2cf7970afee54c643dc (diff)
processor: fix uniqueID to return error instead of infinite loop on Stat errors
Previously, uniqueID(postsDir, t) returned only a string and looped forever when os.Stat returned an error other than IsNotExist (e.g. permission denied). Change the signature to (string, error), propagate the error, and update the caller in processFile to handle it. Add positive and negative tests covering new ID generation, suffix collision, and permission-based stat failure.
Diffstat (limited to 'internal/processor/markdown_test.go')
0 files changed, 0 insertions, 0 deletions