[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tomelr 0d4674f782 42/84: test: Test `tomelr--toml-table
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tomelr 0d4674f782 42/84: test: Test `tomelr--toml-table-p` |
Date: |
Tue, 3 May 2022 09:58:11 -0400 (EDT) |
branch: externals/tomelr
commit 0d4674f782bee99ee36aca079ede57adeccc384f
Author: Kaushal Modi <kaushal.modi@gmail.com>
Commit: Kaushal Modi <kaushal.modi@gmail.com>
test: Test `tomelr--toml-table-p`
---
test/all-tests.el | 2 ++
test/{all-tests.el => tinternal.el} | 36 +++++++++++++++++++++++++++---------
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/test/all-tests.el b/test/all-tests.el
index b031e739ec..45c5442ab4 100644
--- a/test/all-tests.el
+++ b/test/all-tests.el
@@ -21,6 +21,8 @@
(setq load-prefer-newer t)
+(require 'tinternal)
+
(require 'tscalar)
(require 'tnil)
(require 'tarray)
diff --git a/test/all-tests.el b/test/tinternal.el
similarity index 52%
copy from test/all-tests.el
copy to test/tinternal.el
index b031e739ec..9564b5c9af 100644
--- a/test/all-tests.el
+++ b/test/tinternal.el
@@ -1,4 +1,4 @@
-;;; all-tests.el --- Tests for tomelr.el -*-
lexical-binding: t; -*-
+;; -*- lexical-binding: t; -*-
;; Authors: Kaushal Modi <kaushal.modi@gmail.com>
@@ -17,13 +17,31 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-;;; Code:
+;;; Commentary:
-(setq load-prefer-newer t)
+;; Tests for some internal functions.
-(require 'tscalar)
-(require 'tnil)
-(require 'tarray)
-(require 'ttable)
-(require 'ttable-array)
-(require 'tplist)
+;;; Code:
+(require 'tomelr)
+
+;;;; tomelr--toml-table-p
+(ert-deftest test-internal-valid-toml-tables ()
+ (let ((inp '(
+ ((a . 1))
+ (:a 1)
+ ((a . 1) (b . 2))
+ (:a 1 :b 2)
+ )))
+ (dolist (el inp)
+ (should (equal t (tomelr--toml-table-p el))))))
+
+(ert-deftest test-internal-invalid-toml-tables ()
+ (let ((inp '(
+ (a 1)
+ ;; (((a . 1))) ;This is an array of TOML table
+ )))
+ (dolist (el inp)
+ (should (equal nil (tomelr--toml-table-p el))))))
+
+
+(provide 'tinternal)
- [elpa] externals/tomelr 334b7cba54 76/84: refactor: Don't attempt to triple-quote TOML keys, (continued)
- [elpa] externals/tomelr 334b7cba54 76/84: refactor: Don't attempt to triple-quote TOML keys, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr c2d1328c44 80/84: fix: Boolean coercing when value is a symbol true or false, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr ebe5959174 75/84: feat: Auto-coerce string to boolean, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr a676192b43 81/84: fix: Integer coercing of a number strings with underscores, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 8da825067b 15/84: chore(readme): Update, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 65653d53ee 30/84: chore(doc): M-x checkdoc fixes, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr bcaea16ec0 39/84: chore(doc): Clean up old code block, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 45542fb234 67/84: chore: Bump version, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 7c004af90d 66/84: style: Remove unnecessary tomelr-encode-* functions, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 568de5efb2 83/84: chore: Bump version, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 0d4674f782 42/84: test: Test `tomelr--toml-table-p`,
ELPA Syncer <=
- [elpa] externals/tomelr 0eb4fa04ac 43/84: fix: Don't let array of TOML tables be recognized as TOML tables, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr a33dbd1286 50/84: fix: Detect nested TTA correctly when not present in first TT key, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr dc9b2a63f8 60/84: doc: Remove an invalid example, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 044b5e1a04 61/84: fix: TT with key with array value are detected correctly, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 171e5a7682 62/84: fix: List format array of plists now detected as TOML Table Array, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 57bed2cca8 73/84: test: Add a test for string scalar with blank lines, ELPA Syncer, 2022/05/03