summaryrefslogtreecommitdiffstats
path: root/testscripts
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-06-27 09:16:42 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-06-27 21:55:35 +0200
commitfa0e16f4c79a703d122f1e3a3a99f4b779aea9b2 (patch)
tree1c4d7c86daee453906cf91ae7a208ab54aa7d1ab /testscripts
parent12e4c4d5dc7cdb700a6b4f341171a8361e2faa7b (diff)
Fix false path warnings with resources.PostProcess
Fixes #7735
Diffstat (limited to 'testscripts')
-rw-r--r--testscripts/commands/hugo__path-warnings-postprocess.txt20
-rw-r--r--testscripts/commands/hugo__path-warnings.txt26
2 files changed, 46 insertions, 0 deletions
diff --git a/testscripts/commands/hugo__path-warnings-postprocess.txt b/testscripts/commands/hugo__path-warnings-postprocess.txt
new file mode 100644
index 000000000..0677da084
--- /dev/null
+++ b/testscripts/commands/hugo__path-warnings-postprocess.txt
@@ -0,0 +1,20 @@
+hugo --printPathWarnings
+
+! stdout 'Duplicate'
+
+-- hugo.toml --
+-- assets/css/styles.css --
+body {
+ background-color: #000;
+}
+-- content/p1.md --
+-- content/p2.md --
+-- content/p3.md --
+-- layouts/index.html --
+Home.
+-- layouts/_default/single.html --
+{{ $css := resources.Get "css/styles.css" }}
+{{ $css := $css | minify | fingerprint | resources.PostProcess }}
+CSS: {{ $css.RelPermalink }}
+{{ .Title }}
+
diff --git a/testscripts/commands/hugo__path-warnings.txt b/testscripts/commands/hugo__path-warnings.txt
new file mode 100644
index 000000000..f7e3acd95
--- /dev/null
+++ b/testscripts/commands/hugo__path-warnings.txt
@@ -0,0 +1,26 @@
+hugo --printPathWarnings
+
+stdout 'Duplicate'
+
+-- hugo.toml --
+-- assets/css/styles.css --
+body {
+ background-color: #000;
+}
+-- content/p1.md --
+---
+url: /p1/
+---
+-- content/p2.md --
+---
+url: /p1/
+---
+-- content/p3.md --
+---
+url: /p1/
+---
+-- layouts/index.html --
+Home.
+-- layouts/_default/single.html --
+Single.
+