emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/yaml 900ca55584 119/124: Fix failing test for parsing s


From: ELPA Syncer
Subject: [elpa] externals/yaml 900ca55584 119/124: Fix failing test for parsing scalars
Date: Fri, 29 Nov 2024 16:00:11 -0500 (EST)

branch: externals/yaml
commit 900ca55584f4f2fbba1342e095323efdfd248775
Author: Zachary Romero <zacromero@posteo.net>
Commit: Zachary Romero <zacromero@posteo.net>

    Fix failing test for parsing scalars
---
 yaml-tests.el | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/yaml-tests.el b/yaml-tests.el
index b8af0a1c32..acf56e5176 100644
--- a/yaml-tests.el
+++ b/yaml-tests.el
@@ -41,17 +41,19 @@
 
 (ert-deftest yaml-parsing-scalar ()
   "Test conversion of !!str to JSON scalar"
-  (should (equal :null (yaml--resolve-scalar-tag "null")))
-  (should (equal :false (yaml--resolve-scalar-tag "false")))
-  (should (equal t (yaml--resolve-scalar-tag "true")))
-  (should (equal "xtruex" (yaml--resolve-scalar-tag "xtruex")))
-  (should (equal 0 (yaml--resolve-scalar-tag "0")))
-  (should (equal 10 (yaml--resolve-scalar-tag "10")))
-  (should (equal "x10" (yaml--resolve-scalar-tag "x10")))
-  (should (equal 10.52 (yaml--resolve-scalar-tag "10.52")))
-  (should (equal 52.0 (yaml--resolve-scalar-tag ".52e2")))
-  (should (equal 1.0e+INF (yaml--resolve-scalar-tag ".Inf")))
-  (should (equal "hello world" (yaml--resolve-scalar-tag "hello world"))))
+  (let* ((yaml--parsing-null-object :null)
+         (yaml--parsing-false-object :false))
+    (should (equal :null (yaml--resolve-scalar-tag "null")))
+    (should (equal :false (yaml--resolve-scalar-tag "false")))
+    (should (equal t (yaml--resolve-scalar-tag "true")))
+    (should (equal "xtruex" (yaml--resolve-scalar-tag "xtruex")))
+    (should (equal 0 (yaml--resolve-scalar-tag "0")))
+    (should (equal 10 (yaml--resolve-scalar-tag "10")))
+    (should (equal "x10" (yaml--resolve-scalar-tag "x10")))
+    (should (equal 10.52 (yaml--resolve-scalar-tag "10.52")))
+    (should (equal 52.0 (yaml--resolve-scalar-tag ".52e2")))
+    (should (equal 1.0e+INF (yaml--resolve-scalar-tag ".Inf")))
+    (should (equal "hello world" (yaml--resolve-scalar-tag "hello world")))))
 
 (ert-deftest yaml-process-literal-text-test ()
   "Test processing literal strings"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]