[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 8f3e5dd407 2/6: Fix tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 8f3e5dd407 2/6: Fix tests |
Date: |
Sat, 14 Dec 2024 03:57:58 -0500 (EST) |
branch: externals/denote
commit 8f3e5dd407f0ba8132df33488ea556ae57809d28
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Fix tests
---
tests/denote-test.el | 56 +++++++++++++++++++++++++++++++---------------------
1 file changed, 34 insertions(+), 22 deletions(-)
diff --git a/tests/denote-test.el b/tests/denote-test.el
index 8dd2ba92b0..c00e80334b 100644
--- a/tests/denote-test.el
+++ b/tests/denote-test.el
@@ -179,13 +179,15 @@ Extend what we do in
`denote-test--denote-file-type-extensions'."
"Test that `denote--format-front-matter' formats front matter correctly.
To make the test reproducible, set `denote-date-format' to a value that
does not involve the time zone."
- (let ((denote-date-format "%Y-%m-%d"))
+ (let ((denote-date-format "%Y-%m-%d")
+ (denote-front-matter-components-present-even-if-empty-value '(title
keywords signature date identifier)))
(should (and (equal (denote--format-front-matter "" (date-to-time
"20240101T120000") '("") "" "" 'text)
(mapconcat #'identity
'("title: "
"date: 2024-01-01"
"tags: "
"identifier: "
+ "signature: "
"---------------------------\n\n")
"\n"))
@@ -198,6 +200,7 @@ does not involve the time zone."
"date: 2023-06-05"
"tags: one two"
"identifier: 20230605T102234"
+ "signature: sig"
"---------------------------\n\n")
"\n"))))
@@ -207,6 +210,7 @@ does not involve the time zone."
"#+date: 2024-01-01"
"#+filetags: "
"#+identifier: "
+ "#+signature: "
"\n")
"\n"))
@@ -219,6 +223,7 @@ does not involve the time zone."
"#+date: 2023-06-05"
"#+filetags: :one:two:"
"#+identifier: 20230605T102234"
+ "#+signature: sig"
"\n")
"\n"))))
@@ -229,6 +234,7 @@ does not involve the time zone."
"date: 2024-01-01"
"tags: []"
"identifier: \"\""
+ "signature: \"\""
"---"
"\n")
"\n"))
@@ -243,6 +249,7 @@ does not involve the time zone."
"date: 2023-06-05"
"tags: [\"one\", \"two\"]"
"identifier: \"20230605T102234\""
+ "signature: \"sig\""
"---"
"\n")
"\n"))))
@@ -254,6 +261,7 @@ does not involve the time zone."
"date = 2024-01-01"
"tags = []"
"identifier = \"\""
+ "signature = \"\""
"+++"
"\n")
"\n"))
@@ -268,6 +276,7 @@ does not involve the time zone."
"date = 2023-06-05"
"tags = [\"one\", \"two\"]"
"identifier = \"20230605T102234\""
+ "signature = \"sig\""
"+++"
"\n")
"\n"))))))
@@ -302,29 +311,32 @@ does not involve the time zone."
(denote--file-extension 'org)
""))
- (should-error (denote-format-file-name
- (denote-directory)
- nil
- kws
- title
- (denote--file-extension 'org)
- ""))
+ (should (equal (denote-format-file-name
+ (denote-directory)
+ nil
+ kws
+ title
+ (denote--file-extension 'org)
+ "")
+ "/tmp/test-denote/--some-test__one_two.org"))
- (should-error (denote-format-file-name
- (denote-directory)
- ""
- kws
- title
- (denote--file-extension 'org)
- ""))
+ (should (equal (denote-format-file-name
+ (denote-directory)
+ ""
+ kws
+ title
+ (denote--file-extension 'org)
+ "")
+ "/tmp/test-denote/--some-test__one_two.org"))
- (should-error (denote-format-file-name
- (denote-directory)
- "0123456"
- kws
- title
- (denote--file-extension 'org)
- ""))
+ (should (equal (denote-format-file-name
+ (denote-directory)
+ "0123456"
+ kws
+ title
+ (denote--file-extension 'org)
+ "")
+ "/tmp/test-denote/@@0123456--some-test__one_two.org"))
(should (equal (denote-format-file-name
(denote-directory)
- [elpa] externals/denote updated (6613d3903d -> 2ab74c1d47), ELPA Syncer, 2024/12/14
- [elpa] externals/denote 0a5c142287 1/6: Refactor denote--date-convert, ELPA Syncer, 2024/12/14
- [elpa] externals/denote 779fe017dc 3/6: Validate the presence of at least one file name component, ELPA Syncer, 2024/12/14
- [elpa] externals/denote 5d4b9f9089 5/6: Merge pull request #496 from jeanphilippegg/fix-tests, ELPA Syncer, 2024/12/14
- [elpa] externals/denote 8f3e5dd407 2/6: Fix tests,
ELPA Syncer <=
- [elpa] externals/denote 2ab74c1d47 6/6: Merge pull request #495 from jeanphilippegg/denote--date-convert, ELPA Syncer, 2024/12/14
- [elpa] externals/denote 165ef38a9b 4/6: Add denote--generate-date-for-rename, ELPA Syncer, 2024/12/14