diff --git a/test/issues/0682.js b/test/issues/0682.js new file mode 100644 index 00000000..9852e6a5 --- /dev/null +++ b/test/issues/0682.js @@ -0,0 +1,12 @@ +'use strict'; + +const assert = require('assert'); +const fs = require('fs'); +const yaml = require('../..'); + + +it('Should serialize strings with tabs as blocks', function () { + const expected = fs.readFileSync(require('path').join(__dirname, '/0682.yml'), 'utf8'); + const result = yaml.dump({ value: 'a\n\tb' }); + assert.strictEqual(expected, result); +}); diff --git a/test/issues/0682.yml b/test/issues/0682.yml new file mode 100644 index 00000000..1a73c3f2 --- /dev/null +++ b/test/issues/0682.yml @@ -0,0 +1,3 @@ +value: |- + a + b