summaryrefslogtreecommitdiff
path: root/tests/io_files
diff options
context:
space:
mode:
Diffstat (limited to 'tests/io_files')
-rw-r--r--tests/io_files/simple.yaml2
-rw-r--r--tests/io_files/simple_missing_dirs.yaml21
-rw-r--r--tests/io_files/simple_missing_key.yaml29
-rw-r--r--tests/io_files/simple_missing_root_dir.yaml22
4 files changed, 73 insertions, 1 deletions
diff --git a/tests/io_files/simple.yaml b/tests/io_files/simple.yaml
index 0b722a6..df3888b 100644
--- a/tests/io_files/simple.yaml
+++ b/tests/io_files/simple.yaml
@@ -1,6 +1,6 @@
%YAML 1.2
---
-define: &root "$HOME/pyssg/site_example/"
+define: &root "$PYSSG_HOME/pyssg/site_example/"
title: "Example site"
path:
diff --git a/tests/io_files/simple_missing_dirs.yaml b/tests/io_files/simple_missing_dirs.yaml
new file mode 100644
index 0000000..aa15fb5
--- /dev/null
+++ b/tests/io_files/simple_missing_dirs.yaml
@@ -0,0 +1,21 @@
+%YAML 1.2
+---
+define: &root "$PYSSG_HOME/pyssg/site_example/"
+
+title: "Example site"
+path:
+ src: !join [*root, "src"]
+ dst: !join [*root, "dst"]
+ plt: !join [*root, "plt"]
+ db: !join [*root, ".files"]
+url:
+ main: "https://example.com"
+ static: "https://static.example.com"
+ default_image: "images/default.png"
+fmt:
+ date: "%a, %b %d, %Y @ %H:%M %Z"
+ list_date: "%b %d"
+ list_sep_date: "%B %Y"
+dirs:
+# test missing dirs
+... \ No newline at end of file
diff --git a/tests/io_files/simple_missing_key.yaml b/tests/io_files/simple_missing_key.yaml
new file mode 100644
index 0000000..ac81563
--- /dev/null
+++ b/tests/io_files/simple_missing_key.yaml
@@ -0,0 +1,29 @@
+%YAML 1.2
+---
+define: &root "$PYSSG_HOME/pyssg/site_example/"
+
+# test missing mandatory key
+# title: "Example site"
+path:
+ src: !join [*root, "src"]
+ dst: !join [*root, "dst"]
+ plt: !join [*root, "plt"]
+ db: !join [*root, ".files"]
+url:
+ main: "https://example.com"
+ static: "https://static.example.com"
+ default_image: "images/default.png"
+fmt:
+ date: "%a, %b %d, %Y @ %H:%M %Z"
+ list_date: "%b %d"
+ list_sep_date: "%B %Y"
+dirs:
+ /:
+ cfg:
+ plt: "page.html"
+ tags: False
+ index: False
+ rss: False
+ sitemap: False
+ exclude_dirs: []
+... \ No newline at end of file
diff --git a/tests/io_files/simple_missing_root_dir.yaml b/tests/io_files/simple_missing_root_dir.yaml
new file mode 100644
index 0000000..07fa824
--- /dev/null
+++ b/tests/io_files/simple_missing_root_dir.yaml
@@ -0,0 +1,22 @@
+%YAML 1.2
+---
+define: &root "$PYSSG_HOME/pyssg/site_example/"
+
+title: "Example site"
+path:
+ src: !join [*root, "src"]
+ dst: !join [*root, "dst"]
+ plt: !join [*root, "plt"]
+ db: !join [*root, ".files"]
+url:
+ main: "https://example.com"
+ static: "https://static.example.com"
+ default_image: "images/default.png"
+fmt:
+ date: "%a, %b %d, %Y @ %H:%M %Z"
+ list_date: "%b %d"
+ list_sep_date: "%B %Y"
+dirs:
+# test missing /:
+ something:
+... \ No newline at end of file