diff tests/bakes/test_special_root.yaml @ 1169:978ed6deea91

tests: Add ability to test different expected outputs based on Python version. Similar to the previous change, there was also a change in what gets escaped by `urllib.parse.quote` (as in: the tilde sign ('~') stopped being escaped). So now we need to be able to test different outputs in the tests, yay again.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 04 Oct 2019 11:15:11 -0700
parents 45ad976712ec
children
line wrap: on
line diff
--- a/tests/bakes/test_special_root.yaml	Fri Oct 04 11:13:33 2019 -0700
+++ b/tests/bakes/test_special_root.yaml	Fri Oct 04 11:15:11 2019 -0700
@@ -6,5 +6,19 @@
     pages/about.html: 'URL: {{page.url}}, LINK: {{pcurl("missing")}}'
     pages/_index.html: 'URL: {{page.url}}'
 outfiles:
-    about.html: 'URL: /%7Ejohn/public/about.html, LINK: /%7Ejohn/public/missing.html'
-    index.html: 'URL: /%7Ejohn/public/'
+    "{py>=3.7}about.html": 'URL: /~john/public/about.html, LINK: /~john/public/missing.html'
+    "{py>=3.7}index.html": 'URL: /~john/public/'
+    "{py<3.7}about.html": 'URL: /%7Ejohn/public/about.html, LINK: /%7Ejohn/public/missing.html'
+    "{py<3.7}index.html": 'URL: /%7Ejohn/public/'
+---
+config:
+    site:
+        pretty_urls: true
+in:
+    pages/users/~john.html: 'URL: {{page.url}}'
+    pages/users/~john/bio.html: 'URL: {{page.url}}'
+outfiles:
+    "{py>=3.7}users/~john/index.html": 'URL: /users/~john'
+    "{py>=3.7}users/~john/bio/index.html": 'URL: /users/~john/bio'
+    "{py<3.7}users/~john/index.html": 'URL: /users/%7Ejohn'
+    "{py<3.7}users/~john/bio/index.html": 'URL: /users/%7Ejohn/bio'