aboutsummaryrefslogtreecommitdiffhomepage
path: root/testscripts
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-10-31 09:25:28 +0100
committerBjørn Erik Pedersen <[email protected]>2023-10-31 10:42:23 +0100
commitab21433689093a87db68666845d736ad492a056f (patch)
tree70828119c97f18143b41aa8bc904a2d889bf16c6 /testscripts
parent23fcfb7f741a417f53a8ef4997bb68e64631df01 (diff)
downloadhugo-ab21433689093a87db68666845d736ad492a056f.tar.gz
hugo-ab21433689093a87db68666845d736ad492a056f.zip
Fix deprecation printing on info level
Fixes #11638
Diffstat (limited to 'testscripts')
-rw-r--r--testscripts/commands/deprecate.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/testscripts/commands/deprecate.txt b/testscripts/commands/deprecate.txt
new file mode 100644
index 000000000..b15d7ec84
--- /dev/null
+++ b/testscripts/commands/deprecate.txt
@@ -0,0 +1,25 @@
+
+
+hugo -e info --logLevel info
+stdout 'INFO item was deprecated in Hugo'
+
+hugo -e warn --logLevel warn
+stdout 'WARN item was deprecated in Hugo'
+
+! hugo -e error --logLevel warn
+stdout 'ERROR item was deprecated in Hugo'
+
+-- hugo.toml --
+baseURL = "https://example.com/"
+disableKinds = ["taxonomy", "term"]
+-- layouts/index.html --
+Deprecate:
+{{ if eq hugo.Environment "info" }}
+ {{ debug.TestDeprecationInfo "item" "alternative" }}
+{{ end }}
+{{ if eq hugo.Environment "warn" }}
+ {{ debug.TestDeprecationWarn "item" "alternative" }}
+{{ end }}
+{{ if eq hugo.Environment "error" }}
+ {{ debug.TestDeprecationErr "item" "alternative" }}
+{{ end }} \ No newline at end of file