sort output of Write/Marshal

This commit is contained in:
Alex Quick
2017-09-16 17:58:01 -04:00
parent 9f04f40640
commit 3dd2dbe832
2 changed files with 5 additions and 0 deletions

View File

@ -348,6 +348,9 @@ func TestWrite(t *testing.T) {
writeAndCompare(`key=va'lu'e`, `key="va'lu'e"`)
// newlines, backslashes, and some other special chars are escaped
writeAndCompare(`foo="$ba\n\r\\r!"`, `foo="\$ba\n\r\\r\!"`)
// lines should be sorted
writeAndCompare("foo=bar\nbaz=buzz", "baz=\"buzz\"\nfoo=\"bar\"")
}
func TestRoundtrip(t *testing.T) {