2021-01-10 21:59:07 -05:00
|
|
|
// Copyright 2018-2021 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 {
|
2020-12-10 14:45:45 -05:00
|
|
|
console.log("Something went wrong.");
|
2019-11-18 09:39:32 -05:00
|
|
|
}
|