blob: 197ae1574c717aa5af9e78dc3d6774832f7d1a40 [file] [log] [blame]
* Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
* @assertion String name
* Name of the encoding.
* If the encoding is standardized, this is the lower-case version of one of the
* IANA official names for the character set (see
* @description Checks that this property returns name of the encoding
* @author
import "dart:convert";
import "../../../Utils/expect.dart";
main() {
Expect.equals("us-ascii", Encoding.getByName("us-ascii").name);
Expect.equals("us-ascii", Encoding.getByName("US-ASCII").name);
Expect.equals("iso-8859-1", Encoding.getByName("iso-8859-1").name);
Expect.equals("iso-8859-1", Encoding.getByName("ISO-8859-1").name);
Expect.equals("utf-8", Encoding.getByName("utf-8").name);
Expect.equals("utf-8", Encoding.getByName("UTF-8").name);