2020-01-21 10:01:55 -05:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
2019-11-18 09:39:32 -05:00
|
|
|
|
|
|
|
import { parse, stringify } from "../../yaml.ts";
|
|
|
|
|
|
|
|
const test = {
|
|
|
|
foo: {
|
|
|
|
bar: true,
|
|
|
|
test: [
|
|
|
|
"a",
|
|
|
|
"b",
|
|
|
|
{
|
2020-03-28 13:03:49 -04:00
|
|
|
a: false,
|
2019-11-18 09:39:32 -05:00
|
|
|
},
|
|
|
|
{
|
2020-03-28 13:03:49 -04:00
|
|
|
a: false,
|
|
|
|
},
|
|
|
|
],
|
2019-11-18 09:39:32 -05:00
|
|
|
},
|
2020-03-28 13:03:49 -04:00
|
|
|
test: "foobar",
|
2019-11-18 09:39:32 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
const string = stringify(test);
|
|
|
|
if (Deno.inspect(test) === Deno.inspect(parse(string))) {
|
|
|
|
console.log("In-Out as expected.");
|
|
|
|
} else {
|
|
|
|
console.log("Someting went wrong.");
|
|
|
|
}
|