blob: d6395607af22a462becab85af53544d6bdc1ae4d [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 value
/// read / write
/// Gets and sets the value.
/// @description Checks that this property gets and sets the value
/// @author sgrekhov@unipro.ru
import "dart:io";
import "../../../Utils/expect.dart";
main() {
Cookie cookie = new Cookie.fromSetCookieValue(" cname = cval; ");
Expect.equals("cval", cookie.value);
Expect.throws(() {cookie.value = "cvalue 2 ";});
Expect.throws(() {cookie.value = "cvalue;";});
Expect.throws(() {cookie.value = "cvalue\\";});
cookie.value = "";
Expect.equals("", cookie.value);
}