summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-05-07 18:08:46 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-05-07 18:08:46 +0000
commit9e31c0cf91532c1e39055d2b6352f196959a2a13 (patch)
treefb6f0505b0266b35e54a8a4db7f862ee960f612c
parentad80c2d9ed1a348deaacdf11aa17c40382a97ac7 (diff)
YAML: Enable the YAMLParser tests.
This commit enables the tests located in test/YAMLParser directory. Those tests were never actually enabled, as llvm-lit didn't pick up the files with the 'data' extension. The commit renames those test files to files with the 'test' extension so that llvm-lit would find them. This commit also modifies yaml-bench so that it returns an error status if an error occurred during parsing. It also adds the '-use-color' command line option to yaml-bench (to make sure that file check matches the error messages in the output stream). This commit modifies some of the renamed tests so that they wouldn't fail. It gets rid of XFAILs and uses the 'not' command instead for some of the tests that have to fail during parsing. This commit also adds some 'FIXME' comments to a couple of tests that are supposed to fail but currently pass because of various bugs in the implementation of the yaml parser. Reviewers: Justin Bogner Differential Revision: http://reviews.llvm.org/D9448 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236754 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/YAMLParser.h4
-rw-r--r--lib/Support/YAMLParser.cpp23
-rw-r--r--test/YAMLParser/bool.test (renamed from test/YAMLParser/bool.data)0
-rw-r--r--test/YAMLParser/construct-bool.test (renamed from test/YAMLParser/construct-bool.data)0
-rw-r--r--test/YAMLParser/construct-custom.test (renamed from test/YAMLParser/construct-custom.data)0
-rw-r--r--test/YAMLParser/construct-float.test (renamed from test/YAMLParser/construct-float.data)0
-rw-r--r--test/YAMLParser/construct-int.test (renamed from test/YAMLParser/construct-int.data)0
-rw-r--r--test/YAMLParser/construct-map.test (renamed from test/YAMLParser/construct-map.data)0
-rw-r--r--test/YAMLParser/construct-merge.test (renamed from test/YAMLParser/construct-merge.data)0
-rw-r--r--test/YAMLParser/construct-null.test (renamed from test/YAMLParser/construct-null.data)0
-rw-r--r--test/YAMLParser/construct-omap.test (renamed from test/YAMLParser/construct-omap.data)0
-rw-r--r--test/YAMLParser/construct-pairs.test (renamed from test/YAMLParser/construct-pairs.data)0
-rw-r--r--test/YAMLParser/construct-seq.test (renamed from test/YAMLParser/construct-seq.data)0
-rw-r--r--test/YAMLParser/construct-set.test (renamed from test/YAMLParser/construct-set.data)0
-rw-r--r--test/YAMLParser/construct-str-ascii.test (renamed from test/YAMLParser/construct-str-ascii.data)0
-rw-r--r--test/YAMLParser/construct-str.test (renamed from test/YAMLParser/construct-str.data)0
-rw-r--r--test/YAMLParser/construct-timestamp.test (renamed from test/YAMLParser/construct-timestamp.data)0
-rw-r--r--test/YAMLParser/construct-value.test (renamed from test/YAMLParser/construct-value.data)0
-rw-r--r--test/YAMLParser/duplicate-key.former-loader-error.test (renamed from test/YAMLParser/duplicate-key.former-loader-error.data)0
-rw-r--r--test/YAMLParser/duplicate-mapping-key.former-loader-error.test (renamed from test/YAMLParser/duplicate-mapping-key.former-loader-error.data)0
-rw-r--r--test/YAMLParser/duplicate-merge-key.former-loader-error.test (renamed from test/YAMLParser/duplicate-merge-key.former-loader-error.data)0
-rw-r--r--test/YAMLParser/duplicate-value-key.former-loader-error.test (renamed from test/YAMLParser/duplicate-value-key.former-loader-error.data)0
-rw-r--r--test/YAMLParser/emit-block-scalar-in-simple-key-context-bug.test (renamed from test/YAMLParser/emit-block-scalar-in-simple-key-context-bug.data)0
-rw-r--r--test/YAMLParser/empty-document-bug.test (renamed from test/YAMLParser/empty-document-bug.data)0
-rw-r--r--test/YAMLParser/float.test (renamed from test/YAMLParser/float.data)0
-rw-r--r--test/YAMLParser/int.test (renamed from test/YAMLParser/int.data)0
-rw-r--r--test/YAMLParser/invalid-single-quote-bug.test (renamed from test/YAMLParser/invalid-single-quote-bug.data)0
-rw-r--r--test/YAMLParser/merge.test (renamed from test/YAMLParser/merge.data)0
-rw-r--r--test/YAMLParser/more-floats.test (renamed from test/YAMLParser/more-floats.data)0
-rw-r--r--test/YAMLParser/negative-float-bug.test (renamed from test/YAMLParser/negative-float-bug.data)0
-rw-r--r--test/YAMLParser/null.test (renamed from test/YAMLParser/null.data)0
-rw-r--r--test/YAMLParser/resolver.test (renamed from test/YAMLParser/resolver.data)0
-rw-r--r--test/YAMLParser/run-parser-crash-bug.test (renamed from test/YAMLParser/run-parser-crash-bug.data)0
-rw-r--r--test/YAMLParser/scan-document-end-bug.test (renamed from test/YAMLParser/scan-document-end-bug.data)0
-rw-r--r--test/YAMLParser/scan-line-break-bug.test (renamed from test/YAMLParser/scan-line-break-bug.data)0
-rw-r--r--test/YAMLParser/single-dot-is-not-float-bug.test (renamed from test/YAMLParser/single-dot-is-not-float-bug.data)0
-rw-r--r--test/YAMLParser/sloppy-indentation.test (renamed from test/YAMLParser/sloppy-indentation.data)0
-rw-r--r--test/YAMLParser/spec-02-01.test (renamed from test/YAMLParser/spec-02-01.data)0
-rw-r--r--test/YAMLParser/spec-02-02.test (renamed from test/YAMLParser/spec-02-02.data)0
-rw-r--r--test/YAMLParser/spec-02-03.test (renamed from test/YAMLParser/spec-02-03.data)0
-rw-r--r--test/YAMLParser/spec-02-04.test (renamed from test/YAMLParser/spec-02-04.data)0
-rw-r--r--test/YAMLParser/spec-02-05.test (renamed from test/YAMLParser/spec-02-05.data)0
-rw-r--r--test/YAMLParser/spec-02-06.test (renamed from test/YAMLParser/spec-02-06.data)0
-rw-r--r--test/YAMLParser/spec-02-07.test (renamed from test/YAMLParser/spec-02-07.data)0
-rw-r--r--test/YAMLParser/spec-02-08.test (renamed from test/YAMLParser/spec-02-08.data)0
-rw-r--r--test/YAMLParser/spec-02-09.test (renamed from test/YAMLParser/spec-02-09.data)0
-rw-r--r--test/YAMLParser/spec-02-10.test (renamed from test/YAMLParser/spec-02-10.data)0
-rw-r--r--test/YAMLParser/spec-02-11.test (renamed from test/YAMLParser/spec-02-11.data)0
-rw-r--r--test/YAMLParser/spec-02-12.test (renamed from test/YAMLParser/spec-02-12.data)0
-rw-r--r--test/YAMLParser/spec-02-13.test (renamed from test/YAMLParser/spec-02-13.data)0
-rw-r--r--test/YAMLParser/spec-02-14.test (renamed from test/YAMLParser/spec-02-14.data)0
-rw-r--r--test/YAMLParser/spec-02-15.test (renamed from test/YAMLParser/spec-02-15.data)0
-rw-r--r--test/YAMLParser/spec-02-16.test (renamed from test/YAMLParser/spec-02-16.data)0
-rw-r--r--test/YAMLParser/spec-02-17.test (renamed from test/YAMLParser/spec-02-17.data)0
-rw-r--r--test/YAMLParser/spec-02-18.test (renamed from test/YAMLParser/spec-02-18.data)0
-rw-r--r--test/YAMLParser/spec-02-19.test (renamed from test/YAMLParser/spec-02-19.data)0
-rw-r--r--test/YAMLParser/spec-02-20.test (renamed from test/YAMLParser/spec-02-20.data)0
-rw-r--r--test/YAMLParser/spec-02-21.test (renamed from test/YAMLParser/spec-02-21.data)0
-rw-r--r--test/YAMLParser/spec-02-22.test (renamed from test/YAMLParser/spec-02-22.data)0
-rw-r--r--test/YAMLParser/spec-02-23.test (renamed from test/YAMLParser/spec-02-23.data)0
-rw-r--r--test/YAMLParser/spec-02-24.test (renamed from test/YAMLParser/spec-02-24.data)0
-rw-r--r--test/YAMLParser/spec-02-25.test (renamed from test/YAMLParser/spec-02-25.data)0
-rw-r--r--test/YAMLParser/spec-02-26.test (renamed from test/YAMLParser/spec-02-26.data)0
-rw-r--r--test/YAMLParser/spec-02-27.test (renamed from test/YAMLParser/spec-02-27.data)0
-rw-r--r--test/YAMLParser/spec-02-28.test (renamed from test/YAMLParser/spec-02-28.data)0
-rw-r--r--test/YAMLParser/spec-05-01-utf8.test (renamed from test/YAMLParser/spec-05-01-utf8.data)0
-rw-r--r--test/YAMLParser/spec-05-02-utf8.test (renamed from test/YAMLParser/spec-05-02-utf8.data)2
-rw-r--r--test/YAMLParser/spec-05-03.test (renamed from test/YAMLParser/spec-05-03.data)0
-rw-r--r--test/YAMLParser/spec-05-04.test (renamed from test/YAMLParser/spec-05-04.data)0
-rw-r--r--test/YAMLParser/spec-05-05.test (renamed from test/YAMLParser/spec-05-05.data)0
-rw-r--r--test/YAMLParser/spec-05-06.test (renamed from test/YAMLParser/spec-05-06.data)0
-rw-r--r--test/YAMLParser/spec-05-07.test (renamed from test/YAMLParser/spec-05-07.data)0
-rw-r--r--test/YAMLParser/spec-05-08.test (renamed from test/YAMLParser/spec-05-08.data)0
-rw-r--r--test/YAMLParser/spec-05-09.test (renamed from test/YAMLParser/spec-05-09.data)0
-rw-r--r--test/YAMLParser/spec-05-10.test (renamed from test/YAMLParser/spec-05-10.data)2
-rw-r--r--test/YAMLParser/spec-05-11.test (renamed from test/YAMLParser/spec-05-11.data)0
-rw-r--r--test/YAMLParser/spec-05-12.test (renamed from test/YAMLParser/spec-05-12.data)6
-rw-r--r--test/YAMLParser/spec-05-13.test (renamed from test/YAMLParser/spec-05-13.data)0
-rw-r--r--test/YAMLParser/spec-05-14.test (renamed from test/YAMLParser/spec-05-14.data)0
-rw-r--r--test/YAMLParser/spec-05-15.data7
-rw-r--r--test/YAMLParser/spec-05-15.test7
-rw-r--r--test/YAMLParser/spec-06-01.test (renamed from test/YAMLParser/spec-06-01.data)0
-rw-r--r--test/YAMLParser/spec-06-02.test (renamed from test/YAMLParser/spec-06-02.data)0
-rw-r--r--test/YAMLParser/spec-06-03.test (renamed from test/YAMLParser/spec-06-03.data)0
-rw-r--r--test/YAMLParser/spec-06-04.test (renamed from test/YAMLParser/spec-06-04.data)0
-rw-r--r--test/YAMLParser/spec-06-05.test (renamed from test/YAMLParser/spec-06-05.data)0
-rw-r--r--test/YAMLParser/spec-06-06.test (renamed from test/YAMLParser/spec-06-06.data)0
-rw-r--r--test/YAMLParser/spec-06-07.test (renamed from test/YAMLParser/spec-06-07.data)0
-rw-r--r--test/YAMLParser/spec-06-08.test (renamed from test/YAMLParser/spec-06-08.data)0
-rw-r--r--test/YAMLParser/spec-07-01.test (renamed from test/YAMLParser/spec-07-01.data)0
-rw-r--r--test/YAMLParser/spec-07-02.test (renamed from test/YAMLParser/spec-07-02.data)0
-rw-r--r--test/YAMLParser/spec-07-03.data7
-rw-r--r--test/YAMLParser/spec-07-03.test7
-rw-r--r--test/YAMLParser/spec-07-04.test (renamed from test/YAMLParser/spec-07-04.data)0
-rw-r--r--test/YAMLParser/spec-07-05.data10
-rw-r--r--test/YAMLParser/spec-07-05.test8
-rw-r--r--test/YAMLParser/spec-07-06.test (renamed from test/YAMLParser/spec-07-06.data)0
-rw-r--r--test/YAMLParser/spec-07-07a.test (renamed from test/YAMLParser/spec-07-07a.data)0
-rw-r--r--test/YAMLParser/spec-07-07b.test (renamed from test/YAMLParser/spec-07-07b.data)0
-rw-r--r--test/YAMLParser/spec-07-08.test (renamed from test/YAMLParser/spec-07-08.data)0
-rw-r--r--test/YAMLParser/spec-07-09.test (renamed from test/YAMLParser/spec-07-09.data)0
-rw-r--r--test/YAMLParser/spec-07-10.test (renamed from test/YAMLParser/spec-07-10.data)0
-rw-r--r--test/YAMLParser/spec-07-11.test (renamed from test/YAMLParser/spec-07-11.data)0
-rw-r--r--test/YAMLParser/spec-07-12a.test (renamed from test/YAMLParser/spec-07-12a.data)0
-rw-r--r--test/YAMLParser/spec-07-12b.test (renamed from test/YAMLParser/spec-07-12b.data)0
-rw-r--r--test/YAMLParser/spec-07-13.test (renamed from test/YAMLParser/spec-07-13.data)0
-rw-r--r--test/YAMLParser/spec-08-01.test (renamed from test/YAMLParser/spec-08-01.data)0
-rw-r--r--test/YAMLParser/spec-08-02.test (renamed from test/YAMLParser/spec-08-02.data)0
-rw-r--r--test/YAMLParser/spec-08-03.test (renamed from test/YAMLParser/spec-08-03.data)0
-rw-r--r--test/YAMLParser/spec-08-04.data9
-rw-r--r--test/YAMLParser/spec-08-04.test7
-rw-r--r--test/YAMLParser/spec-08-05.test (renamed from test/YAMLParser/spec-08-05.data)0
-rw-r--r--test/YAMLParser/spec-08-06.test (renamed from test/YAMLParser/spec-08-06.data)5
-rw-r--r--test/YAMLParser/spec-08-07.test (renamed from test/YAMLParser/spec-08-07.data)0
-rw-r--r--test/YAMLParser/spec-08-08.test (renamed from test/YAMLParser/spec-08-08.data)0
-rw-r--r--test/YAMLParser/spec-08-09.test (renamed from test/YAMLParser/spec-08-09.data)0
-rw-r--r--test/YAMLParser/spec-08-10.test (renamed from test/YAMLParser/spec-08-10.data)0
-rw-r--r--test/YAMLParser/spec-08-11.test (renamed from test/YAMLParser/spec-08-11.data)0
-rw-r--r--test/YAMLParser/spec-08-12.test (renamed from test/YAMLParser/spec-08-12.data)0
-rw-r--r--test/YAMLParser/spec-08-13.test (renamed from test/YAMLParser/spec-08-13.data)0
-rw-r--r--test/YAMLParser/spec-08-14.test (renamed from test/YAMLParser/spec-08-14.data)0
-rw-r--r--test/YAMLParser/spec-08-15.test (renamed from test/YAMLParser/spec-08-15.data)0
-rw-r--r--test/YAMLParser/spec-09-01.test (renamed from test/YAMLParser/spec-09-01.data)0
-rw-r--r--test/YAMLParser/spec-09-02.data14
-rw-r--r--test/YAMLParser/spec-09-02.test14
-rw-r--r--test/YAMLParser/spec-09-03.test (renamed from test/YAMLParser/spec-09-03.data)0
-rw-r--r--test/YAMLParser/spec-09-04.test (renamed from test/YAMLParser/spec-09-04.data)0
-rw-r--r--test/YAMLParser/spec-09-05.test (renamed from test/YAMLParser/spec-09-05.data)0
-rw-r--r--test/YAMLParser/spec-09-06.test (renamed from test/YAMLParser/spec-09-06.data)0
-rw-r--r--test/YAMLParser/spec-09-07.test (renamed from test/YAMLParser/spec-09-07.data)0
-rw-r--r--test/YAMLParser/spec-09-08.test (renamed from test/YAMLParser/spec-09-08.data)0
-rw-r--r--test/YAMLParser/spec-09-09.test (renamed from test/YAMLParser/spec-09-09.data)0
-rw-r--r--test/YAMLParser/spec-09-10.test (renamed from test/YAMLParser/spec-09-10.data)0
-rw-r--r--test/YAMLParser/spec-09-11.test (renamed from test/YAMLParser/spec-09-11.data)0
-rw-r--r--test/YAMLParser/spec-09-12.test (renamed from test/YAMLParser/spec-09-12.data)0
-rw-r--r--test/YAMLParser/spec-09-13.test (renamed from test/YAMLParser/spec-09-13.data)0
-rw-r--r--test/YAMLParser/spec-09-14.data21
-rw-r--r--test/YAMLParser/spec-09-14.test21
-rw-r--r--test/YAMLParser/spec-09-15.test (renamed from test/YAMLParser/spec-09-15.data)0
-rw-r--r--test/YAMLParser/spec-09-16.test (renamed from test/YAMLParser/spec-09-16.data)0
-rw-r--r--test/YAMLParser/spec-09-17.test (renamed from test/YAMLParser/spec-09-17.data)0
-rw-r--r--test/YAMLParser/spec-09-18.test (renamed from test/YAMLParser/spec-09-18.data)0
-rw-r--r--test/YAMLParser/spec-09-19.test (renamed from test/YAMLParser/spec-09-19.data)0
-rw-r--r--test/YAMLParser/spec-09-20.test (renamed from test/YAMLParser/spec-09-20.data)0
-rw-r--r--test/YAMLParser/spec-09-21.test (renamed from test/YAMLParser/spec-09-21.data)2
-rw-r--r--test/YAMLParser/spec-09-22.test (renamed from test/YAMLParser/spec-09-22.data)0
-rw-r--r--test/YAMLParser/spec-09-23.test (renamed from test/YAMLParser/spec-09-23.data)0
-rw-r--r--test/YAMLParser/spec-09-24.test (renamed from test/YAMLParser/spec-09-24.data)0
-rw-r--r--test/YAMLParser/spec-09-25.test (renamed from test/YAMLParser/spec-09-25.data)0
-rw-r--r--test/YAMLParser/spec-09-26.test (renamed from test/YAMLParser/spec-09-26.data)0
-rw-r--r--test/YAMLParser/spec-09-27.test (renamed from test/YAMLParser/spec-09-27.data)0
-rw-r--r--test/YAMLParser/spec-09-28.test (renamed from test/YAMLParser/spec-09-28.data)0
-rw-r--r--test/YAMLParser/spec-09-29.test (renamed from test/YAMLParser/spec-09-29.data)0
-rw-r--r--test/YAMLParser/spec-09-30.test (renamed from test/YAMLParser/spec-09-30.data)0
-rw-r--r--test/YAMLParser/spec-09-31.test (renamed from test/YAMLParser/spec-09-31.data)0
-rw-r--r--test/YAMLParser/spec-09-32.test (renamed from test/YAMLParser/spec-09-32.data)0
-rw-r--r--test/YAMLParser/spec-09-33.test (renamed from test/YAMLParser/spec-09-33.data)0
-rw-r--r--test/YAMLParser/spec-10-01.test (renamed from test/YAMLParser/spec-10-01.data)0
-rw-r--r--test/YAMLParser/spec-10-02.test (renamed from test/YAMLParser/spec-10-02.data)0
-rw-r--r--test/YAMLParser/spec-10-03.test (renamed from test/YAMLParser/spec-10-03.data)0
-rw-r--r--test/YAMLParser/spec-10-04.test (renamed from test/YAMLParser/spec-10-04.data)0
-rw-r--r--test/YAMLParser/spec-10-05.test (renamed from test/YAMLParser/spec-10-05.data)0
-rw-r--r--test/YAMLParser/spec-10-06.test (renamed from test/YAMLParser/spec-10-06.data)0
-rw-r--r--test/YAMLParser/spec-10-07.test (renamed from test/YAMLParser/spec-10-07.data)0
-rw-r--r--test/YAMLParser/spec-10-08.test (renamed from test/YAMLParser/spec-10-08.data)8
-rw-r--r--test/YAMLParser/spec-10-09.test (renamed from test/YAMLParser/spec-10-09.data)0
-rw-r--r--test/YAMLParser/spec-10-10.test (renamed from test/YAMLParser/spec-10-10.data)0
-rw-r--r--test/YAMLParser/spec-10-11.test (renamed from test/YAMLParser/spec-10-11.data)0
-rw-r--r--test/YAMLParser/spec-10-12.test (renamed from test/YAMLParser/spec-10-12.data)0
-rw-r--r--test/YAMLParser/spec-10-13.test (renamed from test/YAMLParser/spec-10-13.data)0
-rw-r--r--test/YAMLParser/spec-10-14.test (renamed from test/YAMLParser/spec-10-14.data)0
-rw-r--r--test/YAMLParser/spec-10-15.test (renamed from test/YAMLParser/spec-10-15.data)0
-rw-r--r--test/YAMLParser/str.test (renamed from test/YAMLParser/str.data)0
-rw-r--r--test/YAMLParser/timestamp-bugs.test (renamed from test/YAMLParser/timestamp-bugs.data)0
-rw-r--r--test/YAMLParser/timestamp.test (renamed from test/YAMLParser/timestamp.data)0
-rw-r--r--test/YAMLParser/utf8-implicit.test (renamed from test/YAMLParser/utf8-implicit.data)0
-rw-r--r--test/YAMLParser/utf8.test (renamed from test/YAMLParser/utf8.data)0
-rw-r--r--test/YAMLParser/value.test (renamed from test/YAMLParser/value.data)0
-rw-r--r--test/YAMLParser/yaml.test (renamed from test/YAMLParser/yaml.data)0
-rw-r--r--utils/yaml-bench/YAMLBench.cpp12
180 files changed, 104 insertions, 92 deletions
diff --git a/include/llvm/Support/YAMLParser.h b/include/llvm/Support/YAMLParser.h
index db888b816cf..37becaa7b6d 100644
--- a/include/llvm/Support/YAMLParser.h
+++ b/include/llvm/Support/YAMLParser.h
@@ -76,9 +76,9 @@ std::string escape(StringRef Input);
class Stream {
public:
/// \brief This keeps a reference to the string referenced by \p Input.
- Stream(StringRef Input, SourceMgr &);
+ Stream(StringRef Input, SourceMgr &, bool ShowColors = true);
- Stream(MemoryBufferRef InputBuffer, SourceMgr &);
+ Stream(MemoryBufferRef InputBuffer, SourceMgr &, bool ShowColors = true);
~Stream();
document_iterator begin();
diff --git a/lib/Support/YAMLParser.cpp b/lib/Support/YAMLParser.cpp
index cb21eb58e94..83c96510846 100644
--- a/lib/Support/YAMLParser.cpp
+++ b/lib/Support/YAMLParser.cpp
@@ -260,8 +260,8 @@ namespace yaml {
/// @brief Scans YAML tokens from a MemoryBuffer.
class Scanner {
public:
- Scanner(StringRef Input, SourceMgr &SM);
- Scanner(MemoryBufferRef Buffer, SourceMgr &SM_);
+ Scanner(StringRef Input, SourceMgr &SM, bool ShowColors = true);
+ Scanner(MemoryBufferRef Buffer, SourceMgr &SM_, bool ShowColors = true);
/// @brief Parse the next token and return it without popping it.
Token &peekNext();
@@ -271,7 +271,7 @@ public:
void printError(SMLoc Loc, SourceMgr::DiagKind Kind, const Twine &Message,
ArrayRef<SMRange> Ranges = None) {
- SM.PrintMessage(Loc, Kind, Message, Ranges);
+ SM.PrintMessage(Loc, Kind, Message, Ranges, /* FixIts= */ None, ShowColors);
}
void setError(const Twine &Message, StringRef::iterator Position) {
@@ -505,6 +505,9 @@ private:
/// @brief True if an error has occurred.
bool Failed;
+ /// @brief Should colors be used when printing out the diagnostic messages?
+ bool ShowColors;
+
/// @brief Queue of tokens. This is required to queue up tokens while looking
/// for the end of a simple key. And for cases where a single character
/// can produce multiple tokens (e.g. BlockEnd).
@@ -706,11 +709,13 @@ std::string yaml::escape(StringRef Input) {
return EscapedInput;
}
-Scanner::Scanner(StringRef Input, SourceMgr &sm) : SM(sm) {
+Scanner::Scanner(StringRef Input, SourceMgr &sm, bool ShowColors)
+ : SM(sm), ShowColors(ShowColors) {
init(MemoryBufferRef(Input, "YAML"));
}
-Scanner::Scanner(MemoryBufferRef Buffer, SourceMgr &SM_) : SM(SM_) {
+Scanner::Scanner(MemoryBufferRef Buffer, SourceMgr &SM_, bool ShowColors)
+ : SM(SM_), ShowColors(ShowColors) {
init(Buffer);
}
@@ -1525,11 +1530,11 @@ bool Scanner::fetchMoreTokens() {
return false;
}
-Stream::Stream(StringRef Input, SourceMgr &SM)
- : scanner(new Scanner(Input, SM)), CurrentDoc() {}
+Stream::Stream(StringRef Input, SourceMgr &SM, bool ShowColors)
+ : scanner(new Scanner(Input, SM, ShowColors)), CurrentDoc() {}
-Stream::Stream(MemoryBufferRef InputBuffer, SourceMgr &SM)
- : scanner(new Scanner(InputBuffer, SM)), CurrentDoc() {}
+Stream::Stream(MemoryBufferRef InputBuffer, SourceMgr &SM, bool ShowColors)
+ : scanner(new Scanner(InputBuffer, SM, ShowColors)), CurrentDoc() {}
Stream::~Stream() {}
diff --git a/test/YAMLParser/bool.data b/test/YAMLParser/bool.test
index e987a0ec1e3..e987a0ec1e3 100644
--- a/test/YAMLParser/bool.data
+++ b/test/YAMLParser/bool.test
diff --git a/test/YAMLParser/construct-bool.data b/test/YAMLParser/construct-bool.test
index 035ec0c8580..035ec0c8580 100644
--- a/test/YAMLParser/construct-bool.data
+++ b/test/YAMLParser/construct-bool.test
diff --git a/test/YAMLParser/construct-custom.data b/test/YAMLParser/construct-custom.test
index cac95e0a5fb..cac95e0a5fb 100644
--- a/test/YAMLParser/construct-custom.data
+++ b/test/YAMLParser/construct-custom.test
diff --git a/test/YAMLParser/construct-float.data b/test/YAMLParser/construct-float.test
index 07c51bdd833..07c51bdd833 100644
--- a/test/YAMLParser/construct-float.data
+++ b/test/YAMLParser/construct-float.test
diff --git a/test/YAMLParser/construct-int.data b/test/YAMLParser/construct-int.test
index b14c37f7880..b14c37f7880 100644
--- a/test/YAMLParser/construct-int.data
+++ b/test/YAMLParser/construct-int.test
diff --git a/test/YAMLParser/construct-map.data b/test/YAMLParser/construct-map.test
index 1b681206d17..1b681206d17 100644
--- a/test/YAMLParser/construct-map.data
+++ b/test/YAMLParser/construct-map.test
diff --git a/test/YAMLParser/construct-merge.data b/test/YAMLParser/construct-merge.test
index 0ebc9f612d5..0ebc9f612d5 100644
--- a/test/YAMLParser/construct-merge.data
+++ b/test/YAMLParser/construct-merge.test
diff --git a/test/YAMLParser/construct-null.data b/test/YAMLParser/construct-null.test
index 51f8b61e24e..51f8b61e24e 100644
--- a/test/YAMLParser/construct-null.data
+++ b/test/YAMLParser/construct-null.test
diff --git a/test/YAMLParser/construct-omap.data b/test/YAMLParser/construct-omap.test
index b96d6799c7d..b96d6799c7d 100644
--- a/test/YAMLParser/construct-omap.data
+++ b/test/YAMLParser/construct-omap.test
diff --git a/test/YAMLParser/construct-pairs.data b/test/YAMLParser/construct-pairs.test
index 40f288d1d74..40f288d1d74 100644
--- a/test/YAMLParser/construct-pairs.data
+++ b/test/YAMLParser/construct-pairs.test
diff --git a/test/YAMLParser/construct-seq.data b/test/YAMLParser/construct-seq.test
index f43fd39f8ed..f43fd39f8ed 100644
--- a/test/YAMLParser/construct-seq.data
+++ b/test/YAMLParser/construct-seq.test
diff --git a/test/YAMLParser/construct-set.data b/test/YAMLParser/construct-set.test
index 3e9d095e714..3e9d095e714 100644
--- a/test/YAMLParser/construct-set.data
+++ b/test/YAMLParser/construct-set.test
diff --git a/test/YAMLParser/construct-str-ascii.data b/test/YAMLParser/construct-str-ascii.test
index 24290ae8a99..24290ae8a99 100644
--- a/test/YAMLParser/construct-str-ascii.data
+++ b/test/YAMLParser/construct-str-ascii.test
diff --git a/test/YAMLParser/construct-str.data b/test/YAMLParser/construct-str.test
index dc1ce825cdc..dc1ce825cdc 100644
--- a/test/YAMLParser/construct-str.data
+++ b/test/YAMLParser/construct-str.test
diff --git a/test/YAMLParser/construct-timestamp.data b/test/YAMLParser/construct-timestamp.test
index f262c2d02c0..f262c2d02c0 100644
--- a/test/YAMLParser/construct-timestamp.data
+++ b/test/YAMLParser/construct-timestamp.test
diff --git a/test/YAMLParser/construct-value.data b/test/YAMLParser/construct-value.test
index fe01a0dc904..fe01a0dc904 100644
--- a/test/YAMLParser/construct-value.data
+++ b/test/YAMLParser/construct-value.test
diff --git a/test/YAMLParser/duplicate-key.former-loader-error.data b/test/YAMLParser/duplicate-key.former-loader-error.test
index 9272103fe65..9272103fe65 100644
--- a/test/YAMLParser/duplicate-key.former-loader-error.data
+++ b/test/YAMLParser/duplicate-key.former-loader-error.test
diff --git a/test/YAMLParser/duplicate-mapping-key.former-loader-error.data b/test/YAMLParser/duplicate-mapping-key.former-loader-error.test
index 96d175d2ac1..96d175d2ac1 100644
--- a/test/YAMLParser/duplicate-mapping-key.former-loader-error.data
+++ b/test/YAMLParser/duplicate-mapping-key.former-loader-error.test
diff --git a/test/YAMLParser/duplicate-merge-key.former-loader-error.data b/test/YAMLParser/duplicate-merge-key.former-loader-error.test
index 6b1276436ab..6b1276436ab 100644
--- a/test/YAMLParser/duplicate-merge-key.former-loader-error.data
+++ b/test/YAMLParser/duplicate-merge-key.former-loader-error.test
diff --git a/test/YAMLParser/duplicate-value-key.former-loader-error.data b/test/YAMLParser/duplicate-value-key.former-loader-error.test
index dc20e0b275c..dc20e0b275c 100644
--- a/test/YAMLParser/duplicate-value-key.former-loader-error.data
+++ b/test/YAMLParser/duplicate-value-key.former-loader-error.test
diff --git a/test/YAMLParser/emit-block-scalar-in-simple-key-context-bug.data b/test/YAMLParser/emit-block-scalar-in-simple-key-context-bug.test
index f5adedb1350..f5adedb1350 100644
--- a/test/YAMLParser/emit-block-scalar-in-simple-key-context-bug.data
+++ b/test/YAMLParser/emit-block-scalar-in-simple-key-context-bug.test
diff --git a/test/YAMLParser/empty-document-bug.data b/test/YAMLParser/empty-document-bug.test
index fa131fe78ef..fa131fe78ef 100644
--- a/test/YAMLParser/empty-document-bug.data
+++ b/test/YAMLParser/empty-document-bug.test
diff --git a/test/YAMLParser/float.data b/test/YAMLParser/float.test
index c4de97037c8..c4de97037c8 100644
--- a/test/YAMLParser/float.data
+++ b/test/YAMLParser/float.test
diff --git a/test/YAMLParser/int.data b/test/YAMLParser/int.test
index 2651d096ff6..2651d096ff6 100644
--- a/test/YAMLParser/int.data
+++ b/test/YAMLParser/int.test
diff --git a/test/YAMLParser/invalid-single-quote-bug.data b/test/YAMLParser/invalid-single-quote-bug.test
index 3722a003dff..3722a003dff 100644
--- a/test/YAMLParser/invalid-single-quote-bug.data
+++ b/test/YAMLParser/invalid-single-quote-bug.test
diff --git a/test/YAMLParser/merge.data b/test/YAMLParser/merge.test
index 86313596e19..86313596e19 100644
--- a/test/YAMLParser/merge.data
+++ b/test/YAMLParser/merge.test
diff --git a/test/YAMLParser/more-floats.data b/test/YAMLParser/more-floats.test
index 668b31cd13a..668b31cd13a 100644
--- a/test/YAMLParser/more-floats.data
+++ b/test/YAMLParser/more-floats.test
diff --git a/test/YAMLParser/negative-float-bug.data b/test/YAMLParser/negative-float-bug.test
index 0ba0ffee301..0ba0ffee301 100644
--- a/test/YAMLParser/negative-float-bug.data
+++ b/test/YAMLParser/negative-float-bug.test
diff --git a/test/YAMLParser/null.data b/test/YAMLParser/null.test
index a38d7fa6c52..a38d7fa6c52 100644
--- a/test/YAMLParser/null.data
+++ b/test/YAMLParser/null.test
diff --git a/test/YAMLParser/resolver.data b/test/YAMLParser/resolver.test
index 8cbba6328b6..8cbba6328b6 100644
--- a/test/YAMLParser/resolver.data
+++ b/test/YAMLParser/resolver.test
diff --git a/test/YAMLParser/run-parser-crash-bug.data b/test/YAMLParser/run-parser-crash-bug.test
index 3ec910ce047..3ec910ce047 100644
--- a/test/YAMLParser/run-parser-crash-bug.data
+++ b/test/YAMLParser/run-parser-crash-bug.test
diff --git a/test/YAMLParser/scan-document-end-bug.data b/test/YAMLParser/scan-document-end-bug.test
index 7354caf8cd8..7354caf8cd8 100644
--- a/test/YAMLParser/scan-document-end-bug.data
+++ b/test/YAMLParser/scan-document-end-bug.test
diff --git a/test/YAMLParser/scan-line-break-bug.data b/test/YAMLParser/scan-line-break-bug.test
index 792973d3f56..792973d3f56 100644
--- a/test/YAMLParser/scan-line-break-bug.data
+++ b/test/YAMLParser/scan-line-break-bug.test
diff --git a/test/YAMLParser/single-dot-is-not-float-bug.data b/test/YAMLParser/single-dot-is-not-float-bug.test
index 810a5936a89..810a5936a89 100644
--- a/test/YAMLParser/single-dot-is-not-float-bug.data
+++ b/test/YAMLParser/single-dot-is-not-float-bug.test
diff --git a/test/YAMLParser/sloppy-indentation.data b/test/YAMLParser/sloppy-indentation.test
index 2b2b62b14af..2b2b62b14af 100644
--- a/test/YAMLParser/sloppy-indentation.data
+++ b/test/YAMLParser/sloppy-indentation.test
diff --git a/test/YAMLParser/spec-02-01.data b/test/YAMLParser/spec-02-01.test
index dd15b2bc26a..dd15b2bc26a 100644
--- a/test/YAMLParser/spec-02-01.data
+++ b/test/YAMLParser/spec-02-01.test
diff --git a/test/YAMLParser/spec-02-02.data b/test/YAMLParser/spec-02-02.test
index a5695d5c27a..a5695d5c27a 100644
--- a/test/YAMLParser/spec-02-02.data
+++ b/test/YAMLParser/spec-02-02.test
diff --git a/test/YAMLParser/spec-02-03.data b/test/YAMLParser/spec-02-03.test
index 81f8d991f74..81f8d991f74 100644
--- a/test/YAMLParser/spec-02-03.data
+++ b/test/YAMLParser/spec-02-03.test
diff --git a/test/YAMLParser/spec-02-04.data b/test/YAMLParser/spec-02-04.test
index 44a218d5926..44a218d5926 100644
--- a/test/YAMLParser/spec-02-04.data
+++ b/test/YAMLParser/spec-02-04.test
diff --git a/test/YAMLParser/spec-02-05.data b/test/YAMLParser/spec-02-05.test
index c9a4a7572f7..c9a4a7572f7 100644
--- a/test/YAMLParser/spec-02-05.data
+++ b/test/YAMLParser/spec-02-05.test
diff --git a/test/YAMLParser/spec-02-06.data b/test/YAMLParser/spec-02-06.test
index 85c1e2bab8c..85c1e2bab8c 100644
--- a/test/YAMLParser/spec-02-06.data
+++ b/test/YAMLParser/spec-02-06.test
diff --git a/test/YAMLParser/spec-02-07.data b/test/YAMLParser/spec-02-07.test
index c349662a98a..c349662a98a 100644
--- a/test/YAMLParser/spec-02-07.data
+++ b/test/YAMLParser/spec-02-07.test
diff --git a/test/YAMLParser/spec-02-08.data b/test/YAMLParser/spec-02-08.test
index 9746a43788a..9746a43788a 100644
--- a/test/YAMLParser/spec-02-08.data
+++ b/test/YAMLParser/spec-02-08.test
diff --git a/test/YAMLParser/spec-02-09.data b/test/YAMLParser/spec-02-09.test
index 6aef9333799..6aef9333799 100644
--- a/test/YAMLParser/spec-02-09.data
+++ b/test/YAMLParser/spec-02-09.test
diff --git a/test/YAMLParser/spec-02-10.data b/test/YAMLParser/spec-02-10.test
index 0302fa75009..0302fa75009 100644
--- a/test/YAMLParser/spec-02-10.data
+++ b/test/YAMLParser/spec-02-10.test
diff --git a/test/YAMLParser/spec-02-11.data b/test/YAMLParser/spec-02-11.test
index d8cf863b2c1..d8cf863b2c1 100644
--- a/test/YAMLParser/spec-02-11.data
+++ b/test/YAMLParser/spec-02-11.test
diff --git a/test/YAMLParser/spec-02-12.data b/test/YAMLParser/spec-02-12.test
index 3b4d5370a93..3b4d5370a93 100644
--- a/test/YAMLParser/spec-02-12.data
+++ b/test/YAMLParser/spec-02-12.test
diff --git a/test/YAMLParser/spec-02-13.data b/test/YAMLParser/spec-02-13.test
index 2bbccbf5d7d..2bbccbf5d7d 100644
--- a/test/YAMLParser/spec-02-13.data
+++ b/test/YAMLParser/spec-02-13.test
diff --git a/test/YAMLParser/spec-02-14.data b/test/YAMLParser/spec-02-14.test
index 5a18ea213e6..5a18ea213e6 100644
--- a/test/YAMLParser/spec-02-14.data
+++ b/test/YAMLParser/spec-02-14.test
diff --git a/test/YAMLParser/spec-02-15.data b/test/YAMLParser/spec-02-15.test
index 2a7fbe96ad4..2a7fbe96ad4 100644
--- a/test/YAMLParser/spec-02-15.data
+++ b/test/YAMLParser/spec-02-15.test
diff --git a/test/YAMLParser/spec-02-16.data b/test/YAMLParser/spec-02-16.test
index 3a5792c7632..3a5792c7632 100644
--- a/test/YAMLParser/spec-02-16.data
+++ b/test/YAMLParser/spec-02-16.test
diff --git a/test/YAMLParser/spec-02-17.data b/test/YAMLParser/spec-02-17.test
index 2bcb60c8d93..2bcb60c8d93 100644
--- a/test/YAMLParser/spec-02-17.data
+++ b/test/YAMLParser/spec-02-17.test
diff --git a/test/YAMLParser/spec-02-18.data b/test/YAMLParser/spec-02-18.test
index 625a4962e99..625a4962e99 100644
--- a/test/YAMLParser/spec-02-18.data
+++ b/test/YAMLParser/spec-02-18.test
diff --git a/test/YAMLParser/spec-02-19.data b/test/YAMLParser/spec-02-19.test
index cb9df6dd1f4..cb9df6dd1f4 100644
--- a/test/YAMLParser/spec-02-19.data
+++ b/test/YAMLParser/spec-02-19.test
diff --git a/test/YAMLParser/spec-02-20.data b/test/YAMLParser/spec-02-20.test
index ed147986119..ed147986119 100644
--- a/test/YAMLParser/spec-02-20.data
+++ b/test/YAMLParser/spec-02-20.test
diff --git a/test/YAMLParser/spec-02-21.data b/test/YAMLParser/spec-02-21.test
index ea979db065b..ea979db065b 100644
--- a/test/YAMLParser/spec-02-21.data
+++ b/test/YAMLParser/spec-02-21.test
diff --git a/test/YAMLParser/spec-02-22.data b/test/YAMLParser/spec-02-22.test
index 77724f71066..77724f71066 100644
--- a/test/YAMLParser/spec-02-22.data
+++ b/test/YAMLParser/spec-02-22.test
diff --git a/test/YAMLParser/spec-02-23.data b/test/YAMLParser/spec-02-23.test
index d08dfa755c6..d08dfa755c6 100644
--- a/test/YAMLParser/spec-02-23.data
+++ b/test/YAMLParser/spec-02-23.test
diff --git a/test/YAMLParser/spec-02-24.data b/test/YAMLParser/spec-02-24.test
index 56b25cbbd80..56b25cbbd80 100644
--- a/test/YAMLParser/spec-02-24.data
+++ b/test/YAMLParser/spec-02-24.test
diff --git a/test/YAMLParser/spec-02-25.data b/test/YAMLParser/spec-02-25.test
index fbadfda97e3..fbadfda97e3 100644
--- a/test/YAMLParser/spec-02-25.data
+++ b/test/YAMLParser/spec-02-25.test
diff --git a/test/YAMLParser/spec-02-26.data b/test/YAMLParser/spec-02-26.test
index 257108e7e04..257108e7e04 100644
--- a/test/YAMLParser/spec-02-26.data
+++ b/test/YAMLParser/spec-02-26.test
diff --git a/test/YAMLParser/spec-02-27.data b/test/YAMLParser/spec-02-27.test
index a190ff19db0..a190ff19db0 100644
--- a/test/YAMLParser/spec-02-27.data
+++ b/test/YAMLParser/spec-02-27.test
diff --git a/test/YAMLParser/spec-02-28.data b/test/YAMLParser/spec-02-28.test
index 695c27f5d55..695c27f5d55 100644
--- a/test/YAMLParser/spec-02-28.data
+++ b/test/YAMLParser/spec-02-28.test
diff --git a/test/YAMLParser/spec-05-01-utf8.data b/test/YAMLParser/spec-05-01-utf8.test
index 349da06fab2..349da06fab2 100644
--- a/test/YAMLParser/spec-05-01-utf8.data
+++ b/test/YAMLParser/spec-05-01-utf8.test
diff --git a/test/YAMLParser/spec-05-02-utf8.data b/test/YAMLParser/spec-05-02-utf8.test
index 028f41bb557..3666f990e47 100644
--- a/test/YAMLParser/spec-05-02-utf8.data
+++ b/test/YAMLParser/spec-05-02-utf8.test
@@ -1,4 +1,4 @@
-# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
+# RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
# Invalid use of BOM
# inside a
diff --git a/test/YAMLParser/spec-05-03.data b/test/YAMLParser/spec-05-03.test
index 461e98d2c2b..461e98d2c2b 100644
--- a/test/YAMLParser/spec-05-03.data
+++ b/test/YAMLParser/spec-05-03.test
diff --git a/test/YAMLParser/spec-05-04.data b/test/YAMLParser/spec-05-04.test
index 52850f435bf..52850f435bf 100644
--- a/test/YAMLParser/spec-05-04.data
+++ b/test/YAMLParser/spec-05-04.test
diff --git a/test/YAMLParser/spec-05-05.data b/test/YAMLParser/spec-05-05.test
index 499ee8ffb8f..499ee8ffb8f 100644
--- a/test/YAMLParser/spec-05-05.data
+++ b/test/YAMLParser/spec-05-05.test
diff --git a/test/YAMLParser/spec-05-06.data b/test/YAMLParser/spec-05-06.test
index 729141acf4b..729141acf4b 100644
--- a/test/YAMLParser/spec-05-06.data
+++ b/test/YAMLParser/spec-05-06.test
diff --git a/test/YAMLParser/spec-05-07.data b/test/YAMLParser/spec-05-07.test
index fc80a0d4152..fc80a0d4152 100644
--- a/test/YAMLParser/spec-05-07.data
+++ b/test/YAMLParser/spec-05-07.test
diff --git a/test/YAMLParser/spec-05-08.data b/test/YAMLParser/spec-05-08.test
index 9f2b7ece53f..9f2b7ece53f 100644
--- a/test/YAMLParser/spec-05-08.data
+++ b/test/YAMLParser/spec-05-08.test
diff --git a/test/YAMLParser/spec-05-09.data b/test/YAMLParser/spec-05-09.test
index fc061fb2982..fc061fb2982 100644
--- a/test/YAMLParser/spec-05-09.data
+++ b/test/YAMLParser/spec-05-09.test
diff --git a/test/YAMLParser/spec-05-10.data b/test/YAMLParser/spec-05-10.test
index bab2c1b89ca..14112c1eed5 100644
--- a/test/YAMLParser/spec-05-10.data
+++ b/test/YAMLParser/spec-05-10.test
@@ -1,4 +1,4 @@
-# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
+# RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
commercial-at: @text
grave-accent: `text
diff --git a/test/YAMLParser/spec-05-11.data b/test/YAMLParser/spec-05-11.test
index 7cba5562d5f..7cba5562d5f 100644
--- a/test/YAMLParser/spec-05-11.data
+++ b/test/YAMLParser/spec-05-11.test
diff --git a/test/YAMLParser/spec-05-12.data b/test/YAMLParser/spec-05-12.test
index eedfc08cf38..7ecc36dee8b 100644
--- a/test/YAMLParser/spec-05-12.data
+++ b/test/YAMLParser/spec-05-12.test
@@ -1,7 +1,8 @@
# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
#
+# FIXME: This test should actually fail. Yaml-bench should report an error
+# that a tab is being used to indent a plain scalar at line 15.
# We don't currently reject tabs as indentation.
-# XFAIL: *
# Tabs do's and don'ts:
# comment:
@@ -13,4 +14,5 @@ block: |
elsewhere: # separation
indentation, in plain scalar
-# CHECK: error
+
+# CHECK: !!str "Quoted\t\t"
diff --git a/test/YAMLParser/spec-05-13.data b/test/YAMLParser/spec-05-13.test
index db62e866a75..db62e866a75 100644
--- a/test/YAMLParser/spec-05-13.data
+++ b/test/YAMLParser/spec-05-13.test
diff --git a/test/YAMLParser/spec-05-14.data b/test/YAMLParser/spec-05-14.test
index 65451651b69..65451651b69 100644
--- a/test/YAMLParser/spec-05-14.data
+++ b/test/YAMLParser/spec-05-14.test
diff --git a/test/YAMLParser/spec-05-15.data b/test/YAMLParser/spec-05-15.data
deleted file mode 100644
index 27dbd8396ea..00000000000
--- a/test/YAMLParser/spec-05-15.data
+++ /dev/null
@@ -1,7 +0,0 @@
-# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
-
-Bad escapes:
- "\c
- \xq-"
-
-# CHECK: error
diff --git a/test/YAMLParser/spec-05-15.test b/test/YAMLParser/spec-05-15.test
new file mode 100644
index 00000000000..46228bae215
--- /dev/null
+++ b/test/YAMLParser/spec-05-15.test
@@ -0,0 +1,7 @@
+# RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
+
+Bad escapes:
+ "\c
+ \xq-"
+
+# CHECK: error
diff --git a/test/YAMLParser/spec-06-01.data b/test/YAMLParser/spec-06-01.test
index 95b26bdb385..95b26bdb385 100644
--- a/test/YAMLParser/spec-06-01.data
+++ b/test/YAMLParser/spec-06-01.test
diff --git a/test/YAMLParser/spec-06-02.data b/test/YAMLParser/spec-06-02.test
index 40a15c9f3ea..40a15c9f3ea 100644
--- a/test/YAMLParser/spec-06-02.data
+++ b/test/YAMLParser/spec-06-02.test
diff --git a/test/YAMLParser/spec-06-03.data b/test/YAMLParser/spec-06-03.test
index c1893ef0832..c1893ef0832 100644
--- a/test/YAMLParser/spec-06-03.data
+++ b/test/YAMLParser/spec-06-03.test
diff --git a/test/YAMLParser/spec-06-04.data b/test/YAMLParser/spec-06-04.test
index b61bcc6b955..b61bcc6b955 100644
--- a/test/YAMLParser/spec-06-04.data
+++ b/test/YAMLParser/spec-06-04.test
diff --git a/test/YAMLParser/spec-06-05.data b/test/YAMLParser/spec-06-05.test
index 4bcaa5a8189..4bcaa5a8189 100644
--- a/test/YAMLParser/spec-06-05.data
+++ b/test/YAMLParser/spec-06-05.test
diff --git a/test/YAMLParser/spec-06-06.data b/test/YAMLParser/spec-06-06.test
index 67e39ddf899..67e39ddf899 100644
--- a/test/YAMLParser/spec-06-06.data
+++ b/test/YAMLParser/spec-06-06.test
diff --git a/test/YAMLParser/spec-06-07.data b/test/YAMLParser/spec-06-07.test
index 451bd349e3e..451bd349e3e 100644
--- a/test/YAMLParser/spec-06-07.data
+++ b/test/YAMLParser/spec-06-07.test
diff --git a/test/YAMLParser/spec-06-08.data b/test/YAMLParser/spec-06-08.test
index aa06f847ea3..aa06f847ea3 100644
--- a/test/YAMLParser/spec-06-08.data
+++ b/test/YAMLParser/spec-06-08.test
diff --git a/test/YAMLParser/spec-07-01.data b/test/YAMLParser/spec-07-01.test
index 21bc5e59d59..21bc5e59d59 100644
--- a/test/YAMLParser/spec-07-01.data
+++ b/test/YAMLParser/spec-07-01.test
diff --git a/test/YAMLParser/spec-07-02.data b/test/YAMLParser/spec-07-02.test
index bf0e758c880..bf0e758c880 100644
--- a/test/YAMLParser/spec-07-02.data
+++ b/test/YAMLParser/spec-07-02.test
diff --git a/test/YAMLParser/spec-07-03.data b/test/YAMLParser/spec-07-03.data
deleted file mode 100644
index c4a5299562a..00000000000
--- a/test/YAMLParser/spec-07-03.data
+++ /dev/null
@@ -1,7 +0,0 @@
-# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
-
-%YAML 1.1
-%YAML 1.1
-foo
-
-# CHECK: error
diff --git a/test/YAMLParser/spec-07-03.test b/test/YAMLParser/spec-07-03.test
new file mode 100644
index 00000000000..76266b896d7
--- /dev/null
+++ b/test/YAMLParser/spec-07-03.test
@@ -0,0 +1,7 @@
+# RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
+
+%YAML 1.1
+%YAML 1.1
+foo
+
+# CHECK: error
diff --git a/test/YAMLParser/spec-07-04.data b/test/YAMLParser/spec-07-04.test
index 2c8b2ec6959..2c8b2ec6959 100644
--- a/test/YAMLParser/spec-07-04.data
+++ b/test/YAMLParser/spec-07-04.test
diff --git a/test/YAMLParser/spec-07-05.data b/test/YAMLParser/spec-07-05.data
deleted file mode 100644
index f7cff3a8390..00000000000
--- a/test/YAMLParser/spec-07-05.data
+++ /dev/null
@@ -1,10 +0,0 @@
-# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
-#
-# We don't currently parse TAG directives.
-# XFAIL: *
-
-%TAG ! !foo
-%TAG ! !foo
-bar
-
-# CHECK: error
diff --git a/test/YAMLParser/spec-07-05.test b/test/YAMLParser/spec-07-05.test
new file mode 100644
index 00000000000..447cba81902
--- /dev/null
+++ b/test/YAMLParser/spec-07-05.test
@@ -0,0 +1,8 @@
+# RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
+#
+# We don't currently parse TAG directives.
+# CHECK: error: Unexpected token
+
+%TAG ! !foo
+%TAG ! !foo
+bar
diff --git a/test/YAMLParser/spec-07-06.data b/test/YAMLParser/spec-07-06.test
index 9f27f91f311..9f27f91f311 100644
--- a/test/YAMLParser/spec-07-06.data
+++ b/test/YAMLParser/spec-07-06.test
diff --git a/test/YAMLParser/spec-07-07a.data b/test/YAMLParser/spec-07-07a.test
index e51f8f7d694..e51f8f7d694 100644
--- a/test/YAMLParser/spec-07-07a.data
+++ b/test/YAMLParser/spec-07-07a.test
diff --git a/test/YAMLParser/spec-07-07b.data b/test/YAMLParser/spec-07-07b.test
index 003d5755726..003d5755726 100644
--- a/test/YAMLParser/spec-07-07b.data
+++ b/test/YAMLParser/spec-07-07b.test
diff --git a/test/YAMLParser/spec-07-08.data b/test/YAMLParser/spec-07-08.test
index 7197404b384..7197404b384 100644
--- a/test/YAMLParser/spec-07-08.data
+++ b/test/YAMLParser/spec-07-08.test
diff --git a/test/YAMLParser/spec-07-09.data b/test/YAMLParser/spec-07-09.test
index 1f98ba04146..1f98ba04146 100644
--- a/test/YAMLParser/spec-07-09.data
+++ b/test/YAMLParser/spec-07-09.test
diff --git a/test/YAMLParser/spec-07-10.data b/test/YAMLParser/spec-07-10.test
index a1766834781..a1766834781 100644
--- a/test/YAMLParser/spec-07-10.data
+++ b/test/YAMLParser/spec-07-10.test
diff --git a/test/YAMLParser/spec-07-11.data b/test/YAMLParser/spec-07-11.test
index ce14b7ebe4d..ce14b7ebe4d 100644
--- a/test/YAMLParser/spec-07-11.data
+++ b/test/YAMLParser/spec-07-11.test
diff --git a/test/YAMLParser/spec-07-12a.data b/test/YAMLParser/spec-07-12a.test
index 7327f8188e0..7327f8188e0 100644
--- a/test/YAMLParser/spec-07-12a.data
+++ b/test/YAMLParser/spec-07-12a.test
diff --git a/test/YAMLParser/spec-07-12b.data b/test/YAMLParser/spec-07-12b.test
index d759abea7d4..d759abea7d4 100644
--- a/test/YAMLParser/spec-07-12b.data
+++ b/test/YAMLParser/spec-07-12b.test
diff --git a/test/YAMLParser/spec-07-13.data b/test/YAMLParser/spec-07-13.test
index ab74df10187..ab74df10187 100644
--- a/test/YAMLParser/spec-07-13.data
+++ b/test/YAMLParser/spec-07-13.test
diff --git a/test/YAMLParser/spec-08-01.data b/test/YAMLParser/spec-08-01.test
index 5abbfa80949..5abbfa80949 100644
--- a/test/YAMLParser/spec-08-01.data
+++ b/test/YAMLParser/spec-08-01.test
diff --git a/test/YAMLParser/spec-08-02.data b/test/YAMLParser/spec-08-02.test
index 8a75783a709..8a75783a709 100644
--- a/test/YAMLParser/spec-08-02.data
+++ b/test/YAMLParser/spec-08-02.test
diff --git a/test/YAMLParser/spec-08-03.data b/test/YAMLParser/spec-08-03.test
index 8c715305a81..8c715305a81 100644
--- a/test/YAMLParser/spec-08-03.data
+++ b/test/YAMLParser/spec-08-03.test
diff --git a/test/YAMLParser/spec-08-04.data b/test/YAMLParser/spec-08-04.data
deleted file mode 100644
index 73c493d7637..00000000000
--- a/test/YAMLParser/spec-08-04.data
+++ /dev/null
@@ -1,9 +0,0 @@
-# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
-#
-# We don't currently look at the content of literal tags.
-# XFAIL: *
-
-- !<!> foo
-- !<$:?> bar
-
-# CHECK: error
diff --git a/test/YAMLParser/spec-08-04.test b/test/YAMLParser/spec-08-04.test
new file mode 100644
index 00000000000..5b502ae3a17
--- /dev/null
+++ b/test/YAMLParser/spec-08-04.test
@@ -0,0 +1,7 @@
+# RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
+#
+# We don't currently look at the content of literal tags.
+# CHECK: error: Unknown tag handle
+
+- !<!> foo
+- !<$:?> bar
diff --git a/test/YAMLParser/spec-08-05.data b/test/YAMLParser/spec-08-05.test
index 0613446c897..0613446c897 100644
--- a/test/YAMLParser/spec-08-05.data
+++ b/test/YAMLParser/spec-08-05.test
diff --git a/test/YAMLParser/spec-08-06.data b/test/YAMLParser/spec-08-06.test
index 9844f53a4ef..b457d59b569 100644
--- a/test/YAMLParser/spec-08-06.data
+++ b/test/YAMLParser/spec-08-06.test
@@ -1,7 +1,7 @@
-# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
+# RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
#
# We don't currently validate tags.
-# XFAIL: *
+# CHECK: error: Unknown tag handle
%TAG !o! tag:ben-kiki.org,2000:
---
@@ -9,4 +9,3 @@
- !o! bar
- !h!type baz
-# CHECK: error
diff --git a/test/YAMLParser/spec-08-07.data b/test/YAMLParser/spec-08-07.test
index fc3f2df7f05..fc3f2df7f05 100644
--- a/test/YAMLParser/spec-08-07.data
+++ b/test/YAMLParser/spec-08-07.test
diff --git a/test/YAMLParser/spec-08-08.data b/test/YAMLParser/spec-08-08.test
index 460029f6ace..460029f6ace 100644
--- a/test/YAMLParser/spec-08-08.data
+++ b/test/YAMLParser/spec-08-08.test
diff --git a/test/YAMLParser/spec-08-09.data b/test/YAMLParser/spec-08-09.test
index 1c825859431..1c825859431 100644
--- a/test/YAMLParser/spec-08-09.data
+++ b/test/YAMLParser/spec-08-09.test
diff --git a/test/YAMLParser/spec-08-10.data b/test/YAMLParser/spec-08-10.test
index 74054eb0883..74054eb0883 100644
--- a/test/YAMLParser/spec-08-10.data
+++ b/test/YAMLParser/spec-08-10.test
diff --git a/test/YAMLParser/spec-08-11.data b/test/YAMLParser/spec-08-11.test
index 8a75783a709..8a75783a709 100644
--- a/test/YAMLParser/spec-08-11.data
+++ b/test/YAMLParser/spec-08-11.test
diff --git a/test/YAMLParser/spec-08-12.data b/test/YAMLParser/spec-08-12.test
index 69e78b42d27..69e78b42d27 100644
--- a/test/YAMLParser/spec-08-12.data
+++ b/test/YAMLParser/spec-08-12.test
diff --git a/test/YAMLParser/spec-08-13.data b/test/YAMLParser/spec-08-13.test
index 931d56a0cfe..931d56a0cfe 100644
--- a/test/YAMLParser/spec-08-13.data
+++ b/test/YAMLParser/spec-08-13.test
diff --git a/test/YAMLParser/spec-08-14.data b/test/YAMLParser/spec-08-14.test
index 61c448351ae..61c448351ae 100644
--- a/test/YAMLParser/spec-08-14.data
+++ b/test/YAMLParser/spec-08-14.test
diff --git a/test/YAMLParser/spec-08-15.data b/test/YAMLParser/spec-08-15.test
index f21e84a4314..f21e84a4314 100644
--- a/test/YAMLParser/spec-08-15.data
+++ b/test/YAMLParser/spec-08-15.test
diff --git a/test/YAMLParser/spec-09-01.data b/test/YAMLParser/spec-09-01.test
index 8999b496162..8999b496162 100644
--- a/test/YAMLParser/spec-09-01.data
+++ b/test/YAMLParser/spec-09-01.test
diff --git a/test/YAMLParser/spec-09-02.data b/test/YAMLParser/spec-09-02.data
deleted file mode 100644
index 9d8a58ca33a..00000000000
--- a/test/YAMLParser/spec-09-02.data
+++ /dev/null
@@ -1,14 +0,0 @@
-# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
-#
-# Indent trimming is not yet implemented.
-# XFAIL: *
-
- "as space
- trimmed
-
- specific
-
- escaped \
- none"
-
-# CHECK: !!str "as space trimmed\nspecific\nescaped\tnone"
diff --git a/test/YAMLParser/spec-09-02.test b/test/YAMLParser/spec-09-02.test
new file mode 100644
index 00000000000..3f8e49a8bd3
--- /dev/null
+++ b/test/YAMLParser/spec-09-02.test
@@ -0,0 +1,14 @@
+# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
+
+ "as space
+ trimmed
+
+ specific
+
+ escaped \
+ none"
+
+# FIXME: The string below should actually be
+# "as space trimmed\nspecific\nescaped\tnone", but the parser currently has
+# a bug when parsing multiline quoted strings.
+# CHECK: !!str "as space\n trimmed\n specific\n escaped\t none"
diff --git a/test/YAMLParser/spec-09-03.data b/test/YAMLParser/spec-09-03.test
index 3fb0d8b184a..3fb0d8b184a 100644
--- a/test/YAMLParser/spec-09-03.data
+++ b/test/YAMLParser/spec-09-03.test
diff --git a/test/YAMLParser/spec-09-04.data b/test/YAMLParser/spec-09-04.test
index 4178ec6befb..4178ec6befb 100644
--- a/test/YAMLParser/spec-09-04.data
+++ b/test/YAMLParser/spec-09-04.test
diff --git a/test/YAMLParser/spec-09-05.data b/test/YAMLParser/spec-09-05.test
index e482d536623..e482d536623 100644
--- a/test/YAMLParser/spec-09-05.data
+++ b/test/YAMLParser/spec-09-05.test
diff --git a/test/YAMLParser/spec-09-06.data b/test/YAMLParser/spec-09-06.test
index edc0cbba900..edc0cbba900 100644
--- a/test/YAMLParser/spec-09-06.data
+++ b/test/YAMLParser/spec-09-06.test
diff --git a/test/YAMLParser/spec-09-07.data b/test/YAMLParser/spec-09-07.test
index 3c010ca5b93..3c010ca5b93 100644
--- a/test/YAMLParser/spec-09-07.data
+++ b/test/YAMLParser/spec-09-07.test
diff --git a/test/YAMLParser/spec-09-08.data b/test/YAMLParser/spec-09-08.test
index d114e58fcac..d114e58fcac 100644
--- a/test/YAMLParser/spec-09-08.data
+++ b/test/YAMLParser/spec-09-08.test
diff --git a/test/YAMLParser/spec-09-09.data b/test/YAMLParser/spec-09-09.test
index 2fec1b536ef..2fec1b536ef 100644
--- a/test/YAMLParser/spec-09-09.data
+++ b/test/YAMLParser/spec-09-09.test
diff --git a/test/YAMLParser/spec-09-10.data b/test/YAMLParser/spec-09-10.test
index faabfb06b5e..faabfb06b5e 100644
--- a/test/YAMLParser/spec-09-10.data
+++ b/test/YAMLParser/spec-09-10.test
diff --git a/test/YAMLParser/spec-09-11.data b/test/YAMLParser/spec-09-11.test
index 3f487ad6b04..3f487ad6b04 100644
--- a/test/YAMLParser/spec-09-11.data
+++ b/test/YAMLParser/spec-09-11.test
diff --git a/test/YAMLParser/spec-09-12.data b/test/YAMLParser/spec-09-12.test
index d992c589cd6..d992c589cd6 100644
--- a/test/YAMLParser/spec-09-12.data
+++ b/test/YAMLParser/spec-09-12.test
diff --git a/test/YAMLParser/spec-09-13.data b/test/YAMLParser/spec-09-13.test
index d48f2d2c47e..d48f2d2c47e 100644
--- a/test/YAMLParser/spec-09-13.data
+++ b/test/YAMLParser/spec-09-13.test
diff --git a/test/YAMLParser/spec-09-14.data b/test/YAMLParser/spec-09-14.data
deleted file mode 100644
index a83fcd45e2c..00000000000
--- a/test/YAMLParser/spec-09-14.data
+++ /dev/null
@@ -1,21 +0,0 @@
-# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
-#
-# Not quite sure why this doesn't fail.
-# XFAIL: *
-
----
---- ||| : foo
-... >>>: bar
----
-[
----
-,
-... ,
-{
---- :
-... # Nested
-}
-]
-...
-
-# CHECK: error
diff --git a/test/YAMLParser/spec-09-14.test b/test/YAMLParser/spec-09-14.test
new file mode 100644
index 00000000000..55d881de433
--- /dev/null
+++ b/test/YAMLParser/spec-09-14.test
@@ -0,0 +1,21 @@
+# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
+#
+# FIXME: This test should actually fail. Yaml bench should report an error that
+# says that the '---' and '...' document start/end markers must not be specified
+# as the first content line of a non-indented plain scalar.
+# CHECK: !!str
+
+---
+--- ||| : foo
+... >>>: bar
+---
+[
+---
+,
+... ,
+{
+--- :
+... # Nested
+}
+]
+...
diff --git a/test/YAMLParser/spec-09-15.data b/test/YAMLParser/spec-09-15.test
index 4111d1ba2cb..4111d1ba2cb 100644
--- a/test/YAMLParser/spec-09-15.data
+++ b/test/YAMLParser/spec-09-15.test
diff --git a/test/YAMLParser/spec-09-16.data b/test/YAMLParser/spec-09-16.test
index e595f47bece..e595f47bece 100644
--- a/test/YAMLParser/spec-09-16.data
+++ b/test/YAMLParser/spec-09-16.test
diff --git a/test/YAMLParser/spec-09-17.data b/test/YAMLParser/spec-09-17.test
index 1bacf4d68b1..1bacf4d68b1 100644
--- a/test/YAMLParser/spec-09-17.data
+++ b/test/YAMLParser/spec-09-17.test
diff --git a/test/YAMLParser/spec-09-18.data b/test/YAMLParser/spec-09-18.test
index ac623f9973f..ac623f9973f 100644
--- a/test/YAMLParser/spec-09-18.data
+++ b/test/YAMLParser/spec-09-18.test
diff --git a/test/YAMLParser/spec-09-19.data b/test/YAMLParser/spec-09-19.test
index 52aa157137b..52aa157137b 100644
--- a/test/YAMLParser/spec-09-19.data
+++ b/test/YAMLParser/spec-09-19.test
diff --git a/test/YAMLParser/spec-09-20.data b/test/YAMLParser/spec-09-20.test
index 86fc7ab9a2e..86fc7ab9a2e 100644
--- a/test/YAMLParser/spec-09-20.data
+++ b/test/YAMLParser/spec-09-20.test
diff --git a/test/YAMLParser/spec-09-21.data b/test/YAMLParser/spec-09-21.test
index 6eb7917a97e..76bc7d6bd31 100644
--- a/test/YAMLParser/spec-09-21.data
+++ b/test/YAMLParser/spec-09-21.test
@@ -1,4 +1,4 @@
-# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
+# RUN: not yaml-bench -canonical %s 2>&1 | FileCheck %s
- |
diff --git a/test/YAMLParser/spec-09-22.data b/test/YAMLParser/spec-09-22.test
index b95faa50b5d..b95faa50b5d 100644
--- a/test/YAMLParser/spec-09-22.data
+++ b/test/YAMLParser/spec-09-22.test
diff --git a/test/YAMLParser/spec-09-23.data b/test/YAMLParser/spec-09-23.test
index 94f839818b6..94f839818b6 100644
--- a/test/YAMLParser/spec-09-23.data
+++ b/test/YAMLParser/spec-09-23.test
diff --git a/test/YAMLParser/spec-09-24.data b/test/YAMLParser/spec-09-24.test
index f08eae6a80e..f08eae6a80e 100644
--- a/test/YAMLParser/spec-09-24.data
+++ b/test/YAMLParser/spec-09-24.test
diff --git a/test/YAMLParser/spec-09-25.data b/test/YAMLParser/spec-09-25.test
index b15edb523d2..b15edb523d2 100644
--- a/test/YAMLParser/spec-09-25.data
+++ b/test/YAMLParser/spec-09-25.test
diff --git a/test/YAMLParser/spec-09-26.data b/test/YAMLParser/spec-09-26.test
index 286740ed39c..286740ed39c 100644
--- a/test/YAMLParser/spec-09-26.data
+++ b/test/YAMLParser/spec-09-26.test
diff --git a/test/YAMLParser/spec-09-27.data b/test/YAMLParser/spec-09-27.test
index 286740ed39c..286740ed39c 100644
--- a/test/YAMLParser/spec-09-27.data
+++ b/test/YAMLParser/spec-09-27.test
diff --git a/test/YAMLParser/spec-09-28.data b/test/YAMLParser/spec-09-28.test
index 286740ed39c..286740ed39c 100644
--- a/test/YAMLParser/spec-09-28.data
+++ b/test/YAMLParser/spec-09-28.test
diff --git a/test/YAMLParser/spec-09-29.data b/test/YAMLParser/spec-09-29.test
index e8906ff64a1..e8906ff64a1 100644
--- a/test/YAMLParser/spec-09-29.data
+++ b/test/YAMLParser/spec-09-29.test
diff --git a/test/YAMLParser/spec-09-30.data b/test/YAMLParser/spec-09-30.test
index a2d8bf49504..a2d8bf49504 100644
--- a/test/YAMLParser/spec-09-30.data
+++ b/test/YAMLParser/spec-09-30.test
diff --git a/test/YAMLParser/spec-09-31.data b/test/YAMLParser/spec-09-31.test
index a2d8bf49504..a2d8bf49504 100644
--- a/test/YAMLParser/spec-09-31.data
+++ b/test/YAMLParser/spec-09-31.test
diff --git a/test/YAMLParser/spec-09-32.data b/test/YAMLParser/spec-09-32.test
index a2d8bf49504..a2d8bf49504 100644
--- a/test/YAMLParser/spec-09-32.data
+++ b/test/YAMLParser/spec-09-32.test
diff --git a/test/YAMLParser/spec-09-33.data b/test/YAMLParser/spec-09-33.test
index a2d8bf49504..a2d8bf49504 100644
--- a/test/YAMLParser/spec-09-33.data
+++ b/test/YAMLParser/spec-09-33.test
diff --git a/test/YAMLParser/spec-10-01.data b/test/YAMLParser/spec-10-01.test
index 549a54db42f..549a54db42f 100644
--- a/test/YAMLParser/spec-10-01.data
+++ b/test/YAMLParser/spec-10-01.test
diff --git a/test/YAMLParser/spec-10-02.data b/test/YAMLParser/spec-10-02.test
index 662427a0c06..662427a0c06 100644
--- a/test/YAMLParser/spec-10-02.data
+++ b/test/YAMLParser/spec-10-02.test
diff --git a/test/YAMLParser/spec-10-03.data b/test/YAMLParser/spec-10-03.test
index 43f300e40c3..43f300e40c3 100644
--- a/test/YAMLParser/spec-10-03.data
+++ b/test/YAMLParser/spec-10-03.test
diff --git a/test/YAMLParser/spec-10-04.data b/test/YAMLParser/spec-10-04.test
index 733a570efe8..733a570efe8 100644
--- a/test/YAMLParser/spec-10-04.data
+++ b/test/YAMLParser/spec-10-04.test
diff --git a/test/YAMLParser/spec-10-05.data b/test/YAMLParser/spec-10-05.test
index 3848b2a2006..3848b2a2006 100644
--- a/test/YAMLParser/spec-10-05.data
+++ b/test/YAMLParser/spec-10-05.test
diff --git a/test/YAMLParser/spec-10-06.data b/test/YAMLParser/spec-10-06.test
index 40efb2b916c..40efb2b916c 100644
--- a/test/YAMLParser/spec-10-06.data
+++ b/test/YAMLParser/spec-10-06.test
diff --git a/test/YAMLParser/spec-10-07.data b/test/YAMLParser/spec-10-07.test
index 7aa350e40bb..7aa350e40bb 100644
--- a/test/YAMLParser/spec-10-07.data
+++ b/test/YAMLParser/spec-10-07.test
diff --git a/test/YAMLParser/spec-10-08.data b/test/YAMLParser/spec-10-08.test
index 53faeb9e001..c4cb8e65ef2 100644
--- a/test/YAMLParser/spec-10-08.data
+++ b/test/YAMLParser/spec-10-08.test
@@ -1,8 +1,8 @@
# RUN: yaml-bench -canonical %s 2>&1 | FileCheck %s
#
-# This fails because even without a key token, some contexts (in this case flow
-# maps) allow implicit null keys, which mix with this in weird ways.
-# XFAIL: *
+# FIXME: This test should fail. Yaml bench should report an error that a simple
+# key spans across multiple lines and that another simple key is longer than
+# 1024 characters.
{
multi-line
@@ -10,4 +10,4 @@ multi-line
very long ...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................(>1KB)................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... key: value
}
-# CHECK: error
+# CHECK: ? !!str "very long
diff --git a/test/YAMLParser/spec-10-09.data b/test/YAMLParser/spec-10-09.test
index a6b1fd00dde..a6b1fd00dde 100644
--- a/test/YAMLParser/spec-10-09.data
+++ b/test/YAMLParser/spec-10-09.test
diff --git a/test/YAMLParser/spec-10-10.data b/test/YAMLParser/spec-10-10.test
index c97901ddfbe..c97901ddfbe 100644
--- a/test/YAMLParser/spec-10-10.data
+++ b/test/YAMLParser/spec-10-10.test
diff --git a/test/YAMLParser/spec-10-11.data b/test/YAMLParser/spec-10-11.test
index 51bd06f0202..51bd06f0202 100644
--- a/test/YAMLParser/spec-10-11.data
+++ b/test/YAMLParser/spec-10-11.test
diff --git a/test/YAMLParser/spec-10-12.data b/test/YAMLParser/spec-10-12.test
index 65a90b3f2c5..65a90b3f2c5 100644
--- a/test/YAMLParser/spec-10-12.data
+++ b/test/YAMLParser/spec-10-12.test
diff --git a/test/YAMLParser/spec-10-13.data b/test/YAMLParser/spec-10-13.test
index ccadeb1e7d5..ccadeb1e7d5 100644
--- a/test/YAMLParser/spec-10-13.data
+++ b/test/YAMLParser/spec-10-13.test
diff --git a/test/YAMLParser/spec-10-14.data b/test/YAMLParser/spec-10-14.test
index 866ec1f7b2c..866ec1f7b2c 100644
--- a/test/YAMLParser/spec-10-14.data
+++ b/test/YAMLParser/spec-10-14.test
diff --git a/test/YAMLParser/spec-10-15.data b/test/YAMLParser/spec-10-15.test
index 7d061bddd19..7d061bddd19 100644
--- a/test/YAMLParser/spec-10-15.data
+++ b/test/YAMLParser/spec-10-15.test
diff --git a/test/YAMLParser/str.data b/test/YAMLParser/str.test
index bf013b6f52c..bf013b6f52c 100644
--- a/test/YAMLParser/str.data
+++ b/test/YAMLParser/str.test
diff --git a/test/YAMLParser/timestamp-bugs.data b/test/YAMLParser/timestamp-bugs.test
index bf41a21b22d..bf41a21b22d 100644
--- a/test/YAMLParser/timestamp-bugs.data
+++ b/test/YAMLParser/timestamp-bugs.test
diff --git a/test/YAMLParser/timestamp.data b/test/YAMLParser/timestamp.test
index 79945451b54..79945451b54 100644
--- a/test/YAMLParser/timestamp.data
+++ b/test/YAMLParser/timestamp.test
diff --git a/test/YAMLParser/utf8-implicit.data b/test/YAMLParser/utf8-implicit.test
index ee2791fb062..ee2791fb062 100644
--- a/test/YAMLParser/utf8-implicit.data
+++ b/test/YAMLParser/utf8-implicit.test
diff --git a/test/YAMLParser/utf8.data b/test/YAMLParser/utf8.test
index 3935e9d1217..3935e9d1217 100644
--- a/test/YAMLParser/utf8.data
+++ b/test/YAMLParser/utf8.test
diff --git a/test/YAMLParser/value.data b/test/YAMLParser/value.test
index 311ccd4f22e..311ccd4f22e 100644
--- a/test/YAMLParser/value.data
+++ b/test/YAMLParser/value.test
diff --git a/test/YAMLParser/yaml.data b/test/YAMLParser/yaml.test
index 4f9b294f456..4f9b294f456 100644
--- a/test/YAMLParser/yaml.data
+++ b/test/YAMLParser/yaml.test
diff --git a/utils/yaml-bench/YAMLBench.cpp b/utils/yaml-bench/YAMLBench.cpp
index 0fb31387fc2..bd5aa152dff 100644
--- a/utils/yaml-bench/YAMLBench.cpp
+++ b/utils/yaml-bench/YAMLBench.cpp
@@ -19,6 +19,7 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/Timer.h"
+#include "llvm/Support/Process.h"
#include "llvm/Support/YAMLParser.h"
#include "llvm/Support/raw_ostream.h"
#include <system_error>
@@ -52,6 +53,10 @@ static cl::opt<unsigned>
"Do not use more megabytes of memory"),
cl::init(1000));
+cl::opt<cl::boolOrDefault>
+ UseColor("use-color", cl::desc("Emit colored output (default=autodetect)"),
+ cl::init(cl::BOU_UNSET));
+
struct indent {
unsigned distance;
indent(unsigned d) : distance(d) {}
@@ -187,6 +192,9 @@ static std::string createJSONText(size_t MemoryMB, unsigned ValueSize) {
int main(int argc, char **argv) {
llvm::cl::ParseCommandLineOptions(argc, argv);
+ bool ShowColors = UseColor == cl::BOU_UNSET
+ ? sys::Process::StandardOutHasColors()
+ : UseColor == cl::BOU_TRUE;
if (Input.getNumOccurrences()) {
ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
MemoryBuffer::getFileOrSTDIN(Input);
@@ -200,8 +208,10 @@ int main(int argc, char **argv) {
}
if (DumpCanonical) {
- yaml::Stream stream(Buf.getBuffer(), sm);
+ yaml::Stream stream(Buf.getBuffer(), sm, ShowColors);
dumpStream(stream);
+ if (stream.failed())
+ return 1;
}
}