Changeset 7892
- Timestamp:
- 03/14/08 22:59:38 (7 months ago)
- Files:
-
- branches/1.1/COPYRIGHT (modified) (1 diff)
- branches/1.1/lib/autoload/sfCoreAutoload.class.php (modified) (1 diff)
- branches/1.1/lib/config/sfYamlConfigHandler.class.php (modified) (1 diff)
- branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelData.class.php (modified) (2 diffs)
- branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelDatabaseSchema.class.php (modified) (1 diff)
- branches/1.1/lib/plugins/sfPropelPlugin/lib/task/sfPropelDataDumpTask.class.php (modified) (1 diff)
- branches/1.1/lib/task/configure/sfConfigureDatabaseTask.class.php (modified) (1 diff)
- branches/1.1/lib/util/Spyc.class.php (deleted)
- branches/1.1/lib/util/sfYaml.class.php (modified) (4 diffs)
- branches/1.1/lib/util/sfYamlDumper.class.php (added)
- branches/1.1/lib/util/sfYamlInline.class.php (modified) (1 diff)
- branches/1.1/lib/util/sfYamlParser.class.php (added)
- branches/1.1/test/unit/util/SpycTest.php (deleted)
- branches/1.1/test/unit/util/fixtures/yaml (moved) (moved from branches/1.1/test/unit/util/fixtures/Spyc)
- branches/1.1/test/unit/util/fixtures/yaml/YtsAnchorAlias.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/YtsAnchorAlias.yml)
- branches/1.1/test/unit/util/fixtures/yaml/YtsBasicTests.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/YtsBasicTests.yml)
- branches/1.1/test/unit/util/fixtures/yaml/YtsBlockMapping.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/YtsBlockMapping.yml)
- branches/1.1/test/unit/util/fixtures/yaml/YtsDocumentSeparator.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/YtsDocumentSeparator.yml) (6 diffs)
- branches/1.1/test/unit/util/fixtures/yaml/YtsErrorTests.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/YtsErrorTests.yml) (2 diffs)
- branches/1.1/test/unit/util/fixtures/yaml/YtsFlowCollections.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/YtsFlowCollections.yml) (1 diff)
- branches/1.1/test/unit/util/fixtures/yaml/YtsFoldedScalars.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/YtsFoldedScalars.yml) (9 diffs)
- branches/1.1/test/unit/util/fixtures/yaml/YtsNullsAndEmpties.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/YtsNullsAndEmpties.yml) (2 diffs)
- branches/1.1/test/unit/util/fixtures/yaml/YtsSpecificationExamples.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/YtsSpecificationExamples.yml) (15 diffs)
- branches/1.1/test/unit/util/fixtures/yaml/YtsTypeTransfers.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/YtsTypeTransfers.yml) (9 diffs)
- branches/1.1/test/unit/util/fixtures/yaml/index.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/index.yml) (1 diff)
- branches/1.1/test/unit/util/fixtures/yaml/sfComments.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/sfComments.yml) (1 diff)
- branches/1.1/test/unit/util/fixtures/yaml/sfTests.yml (copied) (copied from branches/1.1/test/unit/util/fixtures/Spyc/sfTests.yml) (3 diffs)
- branches/1.1/test/unit/util/sfYamlDumperTest.php (added)
- branches/1.1/test/unit/util/sfYamlInlineTest.php (modified) (1 diff)
- branches/1.1/test/unit/util/sfYamlParserTest.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/COPYRIGHT
r7792 r7892 64 64 License: BSD - see licenses/LICENSE.prado file 65 65 66 Spyc67 ----68 69 symfony contains the Spyc software70 71 Url: http://spyc.sourceforge.net/72 Copyright: 2005-2006 Chris Wanstrath73 License: MIT - http://www.opensource.org/licenses/mit-license.php74 75 66 lime 76 67 ---- branches/1.1/lib/autoload/sfCoreAutoload.class.php
r7757 r7892 353 353 'sfToolkit' => 'util', 354 354 'sfYaml' => 'util', 355 'sfYamlDumper' => 'util', 355 356 'sfYamlInline' => 'util', 356 ' Spyc' => 'util',357 'sfYamlParser' => 'util', 357 358 'sfValidatorI18nChoiceCountry' => 'validator/i18n', 358 359 'sfValidatorI18nChoiceLanguage' => 'validator/i18n', branches/1.1/lib/config/sfYamlConfigHandler.class.php
r7811 r7892 62 62 $config = sfYaml::load($configFile); 63 63 64 if ($config === false || $config === null)64 if ($config === false) 65 65 { 66 66 // configuration couldn't be parsed branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelData.class.php
r7639 r7892 283 283 if (!is_dir($directory_or_file)) 284 284 { 285 file_put_contents($directory_or_file, sfYaml::dump($dumpData ));285 file_put_contents($directory_or_file, sfYaml::dump($dumpData, 3)); 286 286 } 287 287 else … … 295 295 } 296 296 297 file_put_contents(sprintf("%s/%03d-%s.yml", $directory_or_file, ++$i, $tableName), sfYaml::dump(array($tableName => $dumpData[$tableName]) ));297 file_put_contents(sprintf("%s/%03d-%s.yml", $directory_or_file, ++$i, $tableName), sfYaml::dump(array($tableName => $dumpData[$tableName]), 3)); 298 298 } 299 299 } branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelDatabaseSchema.class.php
r7394 r7892 898 898 public function asYAML() 899 899 { 900 return sfYaml::dump(array($this->connection_name => $this->database) );900 return sfYaml::dump(array($this->connection_name => $this->database), 3); 901 901 } 902 902 branches/1.1/lib/plugins/sfPropelPlugin/lib/task/sfPropelDataDumpTask.class.php
r7614 r7892 91 91 else 92 92 { 93 fwrite(STDOUT, sfYaml::dump($data->getData('all', $options['connection']) ));93 fwrite(STDOUT, sfYaml::dump($data->getData('all', $options['connection']), 3)); 94 94 } 95 95 } branches/1.1/lib/task/configure/sfConfigureDatabaseTask.class.php
r7010 r7892 86 86 ); 87 87 88 file_put_contents($file, sfYaml::dump($config ));88 file_put_contents($file, sfYaml::dump($config, 4)); 89 89 90 90 // update propel.ini branches/1.1/lib/util/sfYaml.class.php
r7889 r7892 45 45 } 46 46 47 // syck is prefered over s pyc47 // syck is prefered over sfYamlParser 48 48 if (function_exists('syck_load')) 49 49 { … … 54 54 else 55 55 { 56 require_once(dirname(__FILE__).'/Spyc.class.php'); 56 require_once dirname(__FILE__).'/sfYamlParser.class.php'; 57 $yaml = new sfYamlParser(); 57 58 58 $spyc = new Spyc(); 59 60 return $spyc->load($input); 59 return $yaml->parse($input); 61 60 } 62 61 } … … 72 71 * @return string 73 72 */ 74 public static function dump($array )73 public static function dump($array, $inline = 2) 75 74 { 76 75 if (function_exists('syck_dump')) … … 80 79 else 81 80 { 82 require_once(dirname(__FILE__).'/Spyc.class.php'); 81 require_once dirname(__FILE__).'/sfYamlDumper.class.php'; 82 $yaml = new sfYamlDumper(); 83 83 84 $spyc = new Spyc(); 85 86 return $spyc->dump($array, false, 0); 84 return $yaml->dump($array, $inline); 87 85 } 88 86 } branches/1.1/lib/util/sfYamlInline.class.php
r7886 r7892 81 81 case preg_match(self::getTimestampRegex(), $value): 82 82 return "'$value'"; 83 case in_array(strtolower($value), array('true', 'on', '+', 'yes', 'y')): 84 return "'$value'"; 85 case in_array(strtolower($value), array('false', 'off', '-', 'no', 'n')): 86 return "'$value'"; 83 87 default: 84 88 return $value; branches/1.1/test/unit/util/fixtures/yaml/YtsDocumentSeparator.yml
r2203 r7892 1 1 --- %YAML:1.0 2 2 test: Trailing Document Separator 3 todo: true 3 4 brief: > 4 5 You can separate YAML documents … … 19 20 --- 20 21 test: Leading Document Separator 22 todo: true 21 23 brief: > 22 24 You can explicity give an opening … … 38 40 --- 39 41 test: YAML Header 42 todo: true 40 43 brief: > 41 44 The opening separator can contain directives … … 46 49 foo: 1 47 50 bar: 2 48 python: | 49 [ 50 { 'foo': 1, 'bar': 2 } 51 ] 52 ruby: | 53 y = YAML::Stream.new 54 y.add( { 'foo' => 1, 'bar' => 2 } ) 51 php: | 52 array('foo' => 1, 'bar' => 2) 55 53 documents: 1 56 54 … … 65 63 foo: | 66 64 --- 67 python: | 68 [ 69 { 'foo': "---\n" } 70 ] 71 ruby: | 72 { 'foo' => "---\n" } 65 php: | 66 array('foo' => "---\n") 73 67 74 68 --- … … 85 79 bar: | 86 80 fooness 87 python: | 88 [ 89 { 'foo': flushLeft(""" 90 --- 91 foo: bar 92 --- 93 yo: baz 94 """), 95 'bar': "fooness\n" 96 } 97 ] 98 ruby: | 99 { 81 php: | 82 array( 100 83 'foo' => "---\nfoo: bar\n---\nyo: baz\n", 101 84 'bar' => "fooness\n" 102 }85 ) branches/1.1/test/unit/util/fixtures/yaml/YtsErrorTests.yml
r2203 r7892 1 1 --- 2 2 test: Missing value for hash item 3 todo: true 3 4 brief: | 4 5 Third item in this hash doesn't have a value … … 21 22 firstline: 1 22 23 secondline: 2 23 python-error: Inadequate indentation 24 php: | 25 array('foo' => null, 'firstline' => 1, 'secondline' => 2) 26 branches/1.1/test/unit/util/fixtures/yaml/YtsFlowCollections.yml
r2203 r7892 49 49 ) 50 50 --- 51 test: Commas in Values 51 test: Commas in Values (not in the spec!) 52 52 todo: true 53 53 brief: > branches/1.1/test/unit/util/fixtures/yaml/YtsFoldedScalars.yml
r2203 r7892 12 12 Foo 13 13 Bar 14 15 ruby: | 16 { 'this' => "Foo\nBar\n" } 17 python: | 18 [ 19 { 'this': "Foo\nBar\n" } 20 ] 14 php: | 15 array('this' => "Foo\nBar\n") 21 16 --- 22 17 test: The '+' indicator … … 33 28 34 29 dummy: value 35 ruby: |36 {30 php: | 31 array( 37 32 'normal' => "extra new lines not kept\n", 38 33 'preserving' => "extra new lines are kept\n\n\n", 39 34 'dummy' => 'value' 40 } 41 python: | 42 [ { 43 'normal': "extra new lines not kept\n", 44 'preserving': "extra new lines are kept\n\n\n", 45 'dummy': 'value' 46 } ] 35 ) 47 36 --- 48 37 test: Three trailing newlines in literals … … 75 64 76 65 same as "kept" above: "This has four newlines.\n\n\n\n" 77 ruby: |78 {66 php: | 67 array( 79 68 'clipped' => "This has one newline.\n", 80 69 'same as "clipped" above' => "This has one newline.\n", … … 83 72 'kept' => "This has four newlines.\n\n\n\n", 84 73 'same as "kept" above' => "This has four newlines.\n\n\n\n" 85 } 86 not_yet_in_python: | 87 [ 88 { 89 'clipped': "This has one newline.\n", 90 'same as "clipped" above': "This has one newline.\n", 91 'stripped': 'This has no newline.', 92 'same as "stripped" above': 'This has no newline.', 93 'kept': "This has four newlines.\n\n\n\n", 94 'same as "kept" above': "This has four newlines.\n\n\n\n" 95 } 96 ] 97 74 ) 98 75 --- 99 76 test: Extra trailing newlines with spaces 77 todo: true 100 78 brief: > 101 79 Normally, only a single newline is kept … … 117 95 118 96 119 ruby: |120 {'this' => "Foo\n\n \n",121 'kept' => "Foo\n\n \n" }97 php: | 98 array('this' => "Foo\n\n \n", 99 'kept' => "Foo\n\n \n" ) 122 100 123 101 --- … … 137 115 hmm 138 116 - dog 139 python: | 140 [ 141 [ 142 'apple', 143 'banana', 144 "can't you see the beauty of yaml? hmm\n", 145 'dog' 146 ] 147 ] 148 ruby: | 149 [ 117 php: | 118 array( 150 119 'apple', 151 120 'banana', 152 121 "can't you see the beauty of yaml? hmm\n", 153 122 'dog' 154 ]123 ) 155 124 --- 156 125 test: Folded Block as a Mapping Value … … 166 135 by a knee injury. 167 136 source: espn 168 python: | 169 [ 170 { 171 'quote': "Mark McGwire's year was crippled by a knee injury.\n", 172 'source': 'espn' 173 } 174 ] 175 ruby: | 176 { 137 php: | 138 array( 177 139 'quote' => "Mark McGwire's year was crippled by a knee injury.\n", 178 140 'source' => 'espn' 179 } 180 141 ) 181 142 --- 182 143 test: Three trailing newlines in folded blocks … … 205 166 206 167 same as "kept" above: "This has four newlines.\n\n\n\n" 207 ruby: |208 {168 php: | 169 array( 209 170 'clipped' => "This has one newline.\n", 210 171 'same as "clipped" above' => "This has one newline.\n", … … 213 174 'kept' => "This has four newlines.\n\n\n\n", 214 175 'same as "kept" above' => "This has four newlines.\n\n\n\n" 215 }176 ) branches/1.1/test/unit/util/fixtures/yaml/YtsNullsAndEmpties.yml
r2499 r7892 31 31 --- 32 32 test: Null as Document 33 todo: true34 33 yaml: | 35 34 ~ … … 38 37 --- 39 38 test: Empty String 40 todo: true41 39 brief: > 42 40 You can represent an empty string branches/1.1/test/unit/util/fixtures/yaml/YtsSpecificationExamples.yml
r2203 r7892 6 6 - Sammy Sosa 7 7 - Ken Griffey 8 perl: | 9 [ 'Mark McGwire', 'Sammy Sosa', 'Ken Griffey' ] 10 python: | 11 [ ['Mark McGwire', 'Sammy Sosa', 'Ken Griffey'] ] 12 ruby: | 13 [ 'Mark McGwire', 'Sammy Sosa', 'Ken Griffey' ] 14 syck: | 15 struct test_node seq[] = { 16 { T_STR, 0, "Mark McGwire" }, 17 { T_STR, 0, "Sammy Sosa" }, 18 { T_STR, 0, "Ken Griffey" }, 19 end_node 20 }; 21 struct test_node stream[] = { 22 { T_SEQ, 0, 0, seq }, 23 end_node 24 }; 25 8 php: | 9 array('Mark McGwire', 'Sammy Sosa', 'Ken Griffey') 26 10 --- 27 11 test: Mapping of scalars to scalars … … 31 15 avg: 0.278 32 16 rbi: 147 33 perl: | 34 { hr => 65, avg => 0.278, rbi => 147 } 35 python: | 36 [ {'hr': 65, 'avg': .278, 'rbi': 147} ] 37 ruby: | 38 { 'hr' => 65, 'avg' => 0.278, 'rbi' => 147 } 39 syck: | 40 struct test_node map[] = { 41 { T_STR, 0, "hr" }, 42 { T_STR, 0, "65" }, 43 { T_STR, 0, "avg" }, 44 { T_STR, 0, "0.278" }, 45 { T_STR, 0, "rbi" }, 46 { T_STR, 0, "147" }, 47 end_node 48 }; 49 struct test_node stream[] = { 50 { T_MAP, 0, 0, map }, 51 end_node 52 }; 53 17 php: | 18 array('hr' => 65, 'avg' => 0.278, 'rbi' => 147) 54 19 --- 55 20 test: Mapping of scalars to sequences … … 64 29 - Chicago Cubs 65 30 - Atlanta Braves 66 perl: | 67 { american => 68 [ 'Boston Red Sox', 'Detroit Tigers', 69 'New York Yankees' ], 70 national => 71 [ 'New York Mets', 'Chicago Cubs', 72 'Atlanta Braves' ] 73 } 74 python: | 75 [ 76 { 77 'american': 78 ['Boston Red Sox', 'Detroit Tigers', 79 'New York Yankees'], 80 'national': 81 ['New York Mets', 'Chicago Cubs', 82 'Atlanta Braves'] 83 } 84 ] 85 ruby: | 86 { 'american' => 87 [ 'Boston Red Sox', 'Detroit Tigers', 88 'New York Yankees' ], 31 php: | 32 array('american' => 33 array( 'Boston Red Sox', 'Detroit Tigers', 34 'New York Yankees' ), 89 35 'national' => 90 [ 'New York Mets', 'Chicago Cubs', 91 'Atlanta Braves' ] 92 } 93 syck: | 94 struct test_node seq1[] = { 95 { T_STR, 0, "Boston Red Sox" }, 96 { T_STR, 0, "Detroit Tigers" }, 97 { T_STR, 0, "New York Yankees" }, 98 end_node 99 }; 100 struct test_node seq2[] = { 101 { T_STR, 0, "New York Mets" }, 102 { T_STR, 0, "Chicago Cubs" }, 103 { T_STR, 0, "Atlanta Braves" }, 104 end_node 105 }; 106 struct test_node map[] = { 107 { T_STR, 0, "american" }, 108 { T_SEQ, 0, 0, seq1 }, 109 { T_STR, 0, "national" }, 110 { T_SEQ, 0, 0, seq2 }, 111 end_node 112 }; 113 struct test_node stream[] = { 114 { T_MAP, 0, 0, map }, 115 end_node 116 }; 117 36 array( 'New York Mets', 'Chicago Cubs', 37 'Atlanta Braves' ) 38 ) 118 39 --- 119 40 test: Sequence of mappings … … 128 49 hr: 63 129 50 avg: 0.288 130 perl: | 131 [ 132 {name => 'Mark McGwire', hr => 65, avg => 0.278}, 133 {name => 'Sammy Sosa', hr => 63, avg => 0.288} 134 ] 135 python: | 136 [[ 137 { 138 'name': 'Mark McGwire', 139 'hr': 65, 140 'avg': 0.278 141 }, 142 { 143 'name': 'Sammy Sosa', 144 'hr': 63, 145 'avg': 0.288 146 } 147 ]] 148 ruby: | 149 [ 150 {'name' => 'Mark McGwire', 'hr' => 65, 'avg' => 0.278}, 151 {'name' => 'Sammy Sosa', 'hr' => 63, 'avg' => 0.288} 152 ] 153 syck: | 154 struct test_node map1[] = { 155 { T_STR, 0, "name" }, 156 { T_STR, 0, "Mark McGwire" }, 157 { T_STR, 0, "hr" }, 158 { T_STR, 0, "65" }, 159 { T_STR, 0, "avg" }, 160 { T_STR, 0, "0.278" }, 161 end_node 162 }; 163 struct test_node map2[] = { 164 { T_STR, 0, "name" }, 165 { T_STR, 0, "Sammy Sosa" }, 166 { T_STR, 0, "hr" }, 167 { T_STR, 0, "63" }, 168 { T_STR, 0, "avg" }, 169 { T_STR, 0, "0.288" }, 170 end_node 171 }; 172 struct test_node seq[] = { 173 { T_MAP, 0, 0, map1 }, 174 { T_MAP, 0, 0, map2 }, 175 end_node 176 }; 177 struct test_node stream[] = { 178 { T_SEQ, 0, 0, seq }, 179 end_node 180 }; 181 51 php: | 52 array( 53 array('name' => 'Mark McGwire', 'hr' => 65, 'avg' => 0.278), 54 array('name' => 'Sammy Sosa', 'hr' => 63, 'avg' => 0.288) 55 ) 182 56 --- 183 57 test: Legacy A5 58 todo: true 184 59 spec: legacy_A5 185 60 yaml: | … … 254 129 --- 255 130 test: Sequence of sequences 131 todo: true 256 132 spec: 2.5 257 133 yaml: | … … 309 185 --- 310 186 test: Mapping of mappings 187 todo: true 311 188 spec: 2.6 312 189 yaml: | … … 365 242 test: Two documents in a stream each with a 366 243 leading comment 244 todo: true 367 245 spec: 2.7 368 246 yaml: | … … 410 288 --- 411 289 test: Play by play feed from a game 290 todo: true 412 291 spec: 2.8 413 292 yaml: | … … 458 337 --- 459 338 test: Single document with two comments 339 todo: true 460 340 spec: 2.9 461 341 yaml: | … … 507 387 --- 508 388 test: Node for Sammy Sosa appears twice in this document 389 todo: true 509 390 spec: 2.10 510 391 yaml: | … … 559 440 --- 560 441 test: Mapping between sequences 442 todo: true 561 443 spec: 2.11 562 444 yaml: | … … 611 493 --- 612 494 test: Sequence key shortcut 495 todo: true 613 496 spec: 2.12 614 497 yaml: | … … 676 559 --- 677 560 test: Literal perserves newlines 561 todo: true 678 562 spec: 2.13 679 563 yaml: | … … 703 587 --- 704 588 test: Folded treats newlines as a space 589 todo: true 705 590 spec: 2.14 706 591 yaml: | … … 723 608 --- 724 609 test: Newlines preserved for indented and blank lines 610 todo: true 725 611 spec: 2.15 726 612 yaml: | branches/1.1/test/unit/util/fixtures/yaml/YtsTypeTransfers.yml
r2203 r7892 1 1 --- %YAML:1.0 2 2 test: Strings 3 todo: true4 3 brief: > 5 4 Any group of characters beginning with an … … 37 36 --- 38 37 test: Indicators in Strings 39 todo: true40 38 brief: > 41 39 Be careful using indicators in strings. In particular, … … 53 51 --- 54 52 test: Forcing Strings 55 todo: true56 53 brief: > 57 54 Any YAML type can be forced into a string using the … … 67 64 --- 68 65 test: Single-quoted Strings 69 todo: true70 66 brief: > 71 67 You can also enclose your strings within single quotes, … … 86 82 --- 87 83 test: Double-quoted Strings 88 todo: true89 84 brief: > 90 85 Enclosing strings in double quotes allows you … … 172 167 --- 173 168 test: Integers 174 todo: true175 169 brief: > 176 170 An integer is a series of numbers, optionally … … 205 199 --- 206 200 test: Floats 207 todo: true208 201 brief: > 209 202 Floats are represented by numbers with decimals, … … 233 226 php: | 234 227 array( 235 'iso8601' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ),236 'space seperated' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" )228 'iso8601' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), 229 'space seperated' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ) 237 230 ) 238 231 --- … … 245 238 1976-07-31 246 239 php: | 247 Date.new( 1976, 7, 31 )240 date( 1976, 7, 31 ) branches/1.1/test/unit/util/fixtures/yaml/index.yml
r3186 r7892 1 - sfComments 2 - sfTests 3 #- YtsAnchorAlias 1 4 - YtsBasicTests 2 5 - YtsBlockMapping 6 - YtsDocumentSeparator 7 - YtsErrorTests 3 8 - YtsFlowCollections 4 - YtsTypeTransfers 5 #- YtsFoldedScalars 6 #- YtsAnchorAlias 7 #- YtsDocumentSeparator 9 - YtsFoldedScalars 8 10 - YtsNullsAndEmpties 9 11 #- YtsSpecificationExamples 10 - sfComments 11 - sfTests 12 - YtsTypeTransfers branches/1.1/test/unit/util/fixtures/yaml/sfComments.yml
r2918 r7892 9 9 php: | 10 10 array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar') 11 --- 12 test: Comments in the middle 13 brief: > 14 Comments in the middle 15 yaml: | 16 foo: 17 # some comment 18 # some comment 19 bar: foo 20 # some comment 21 # some comment 22 php: | 23 array('foo' => array('bar' => 'foo')) branches/1.1/test/unit/util/fixtures/yaml/sfTests.yml
r3599 r7892 7 7 php: | 8 8 array('stripped_title' => array('name' => 'foo bar', 'help' => 'bar foo')) 9 9 --- 10 10 test: Empty sequence 11 11 yaml: | … … 13 13 php: | 14 14 array('foo' => array()) 15 15 --- 16 16 test: Inline string parsing 17 17 brief: > … … 21 21 php: | 22 22 array('test' => array('complex: string', 'another [string]')) 23 --- 24 test: Boolean 25 brief: > 26 Boolean 27 yaml: | 28 - false 29 - - 30 - off 31 - no 32 - true 33 - + 34 - on 35 - yes 36 - 'false' 37 - '-' 38 - 'off' 39 - 'no' 40 - 'true' 41 - '+' 42 - 'on' 43 - 'yes' 44 php: | 45 array( 46 false, 47 false, 48 false, 49 false, 50 true, 51 true, 52 true, 53 true, 54 'false', 55 '-', 56 'off', 57 'no', 58 'true', 59 '+', 60 'on', 61 'yes', 62 ) branches/1.1/test/unit/util/sfYamlInlineTest.php
r7886 r7892 86 86 87 87 // mappings 88 '{ foo: bar, bar: foo, false: false, null: null, integer: 12 }' => array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12),88 '{ foo: bar, bar: foo, \'false\': false, null: null, integer: 12 }' => array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12), 89 89 '{ foo: bar, bar: \'foo: bar\' }' => array('foo' => 'bar', 'bar' => 'foo: bar'), 90 90