16e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// Copyright 2013 the V8 project authors. All rights reserved. 26e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// Redistribution and use in source and binary forms, with or without 36e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// modification, are permitted provided that the following conditions are 46e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// met: 56e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// 66e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// * Redistributions of source code must retain the above copyright 76e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// notice, this list of conditions and the following disclaimer. 86e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// * Redistributions in binary form must reproduce the above 96e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// copyright notice, this list of conditions and the following 106e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// disclaimer in the documentation and/or other materials provided 116e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// with the distribution. 126e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// * Neither the name of Google Inc. nor the names of its 136e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// contributors may be used to endorse or promote products derived 146e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// from this software without specific prior written permission. 156e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// 166e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 176e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 186e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 196e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 206e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 216e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 226e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 236e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 246e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 256e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 266e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 276e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org 286e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.orgassertArrayEquals(["\u00a0"], "ab\u00a0cd".match(/\s/)); 296e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.orgassertArrayEquals(["a", "b", "c", "d"], "ab\u00a0cd".match(/\S/g)); 306e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.org 316e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.orgassertArrayEquals(["\u00a0"], "\u2604b\u00a0cd".match(/\s/)); 326e196bfaf0e555d0c835390bb6ebc0a74484491dulan@chromium.orgassertArrayEquals(["\u2604", "b", "c", "d"], "\u2604b\u00a0cd".match(/\S/g)); 33