Comments (3)
IMHO, out-yaml
is wrong, as the intent of that example in the spec is clearly to show an example with only 2 docs. (also note that ...
on their own don't introduce a new document)
I'm a bit suprised btw that the canonical right-hand-side of example 9.3 doesn't read
%YAML 1.2
---
!!str "Bare document"
...
%YAML 1.2
---
!!str "%!PS-Adobe-2.0\n"
(notice the ...
) like the similar one from example 9.5 had.
PS: To expand a bit more:
The YAML 1.2 spec says (emphasis added)
YAML uses three dashes (“---”) to separate directives from document content. This also serves to signal the start of a document if no directives are present. Three dots ( “...”) indicate the end of a document without starting a new one, for use in communication channels.
moreover,
[205] l-document-suffix ::= c-document-end s-l-comments
So the # No document
comment would be part of the l-document-suffix
production.
Moreover,
[211] l-yaml-stream ::= l-document-prefix* l-any-document?
( l-document-suffix+ l-document-prefix* l-any-document?
| l-document-prefix* l-explicit-document? )*
encodes that multiple consecutive occurences of l-document-suffix
count as one.
Hence we got only two documents, and thus test-event
stating
+STR
+DOC
=VAL :Bare document
-DOC ...
+DOC
=VAL |%!PS-Adobe-2.0 # Not the first line\n
-DOC
-STR
is in fact correct.
from yaml-test-suite.
Thanks, my suggested fix is in #42
from yaml-test-suite.
Merged #42
from yaml-test-suite.
Related Issues (20)
- Individual tags per subtest don't work
- 8G76: an empty file is not a valid JSON document HOT 7
- Should L24T/01/in.yaml and JEF9/02/in.yaml end with \n? HOT 2
- is there some logic to the naming of tests? HOT 2
- Explain Token stream notation, Event stream notation HOT 1
- Create a use case for trailing TAB
- norway problem HOT 1
- Is there an error in 4H7K HOT 1
- Why is `a: :a` valid while `a: a:` is not?
- Fix generated test in Y79Y
- Scala-yaml uses this test suite HOT 1
- json for 4ABK HOT 1
- Missing tests for spec sections 5.13 and 5.14 (Escaped Characters) HOT 2
- 4FJ6 events HOT 2
- K54U out.yaml HOT 7
- 4ABK null value HOT 1
- L24T doublequote instead of literal in `emit.yaml` HOT 2
- Missing Output yaml for 5TYM
- Add test for e.g. `[[], :@]` HOT 1
- Address #40 and #54
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yaml-test-suite.