~tcuthbert/wordpress/openstack-objectstorage

« back to all changes in this revision

Viewing changes to vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- %YAML:1.0
 
2
test: Comments at the end of a line
 
3
brief: >
 
4
    Comments at the end of a line
 
5
yaml: |
 
6
    ex1: "foo # bar"
 
7
    ex2: "foo # bar" # comment
 
8
    ex3: 'foo # bar' # comment
 
9
    ex4: foo # comment
 
10
php: |
 
11
    array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo')
 
12
---
 
13
test: Comments in the middle
 
14
brief: >
 
15
  Comments in the middle
 
16
yaml: |
 
17
    foo:
 
18
    # some comment
 
19
    # some comment
 
20
      bar: foo
 
21
    # some comment
 
22
    # some comment
 
23
php: |
 
24
    array('foo' => array('bar' => 'foo'))
 
25
---
 
26
test: Comments on a hash line
 
27
brief: >
 
28
  Comments on a hash line
 
29
yaml: |
 
30
    foo:   # a comment
 
31
      foo: bar # a comment
 
32
php: |
 
33
    array('foo' => array('foo' => 'bar'))
 
34
---
 
35
test: 'Value starting with a #'
 
36
brief: >
 
37
  'Value starting with a #'
 
38
yaml: |
 
39
    foo:   '#bar'
 
40
php: |
 
41
    array('foo' => '#bar')
 
42
---
 
43
test: Document starting with a comment and a separator
 
44
brief: >
 
45
  Commenting before document start is allowed
 
46
yaml: |
 
47
    # document comment
 
48
    ---
 
49
    foo: bar # a comment
 
50
php: |
 
51
    array('foo' => 'bar')
 
52
---
 
53
test: Comment containing a colon on a hash line
 
54
brief: >
 
55
    Comment containing a colon on a scalar line
 
56
yaml: 'foo # comment: this is also part of the comment'
 
57
php: |
 
58
    'foo'
 
59
---
 
60
test: 'Hash key containing a #'
 
61
brief: >
 
62
    'Hash key containing a #'
 
63
yaml: 'foo#bar: baz'
 
64
php: |
 
65
    array('foo#bar' => 'baz')
 
66
---
 
67
test: 'Hash key ending with a space and a #'
 
68
brief: >
 
69
    'Hash key ending with a space and a #'
 
70
yaml: |
 
71
    'foo #': baz
 
72
php: |
 
73
    array('foo #' => 'baz')