branch: externals/yaml
commit fe08b8f5307af1e7b876ece64b7303213f04b63c
Merge: 01a12f2345 900ca55584
Author: Zachary Romero <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #52 from zkry/51-fix-failing-test
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"