-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): Disable line folding in YAML (#2964)
Certain versions of YAML support long line folding, however the CloudFormation YAML parser does not handle those. Disabling folding when generating YAML so that we keep generating correct templates. Fixes #2703
- Loading branch information
1 parent
e535929
commit 0dabb02
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import nodeunit = require('nodeunit'); | ||
import { toYAML } from '../lib/serialize'; | ||
|
||
export = nodeunit.testCase({ | ||
toYAML: { | ||
'does not wrap lines'(test: nodeunit.Test) { | ||
const longString = 'Long string is long!'.repeat(1_024); | ||
test.equal(toYAML({ longString }), `longString: ${longString}\n`); | ||
test.done(); | ||
} | ||
} | ||
}); |