• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "gtest/gtest.h"
6 
7 #include "flutter/fml/paths.h"
8 
TEST(Paths,SanitizeURI)9 TEST(Paths, SanitizeURI) {
10   ASSERT_EQ(fml::paths::SanitizeURIEscapedCharacters("hello"), "hello");
11   ASSERT_EQ(fml::paths::SanitizeURIEscapedCharacters(""), "");
12   ASSERT_EQ(fml::paths::SanitizeURIEscapedCharacters("hello%20world"),
13             "hello world");
14   ASSERT_EQ(fml::paths::SanitizeURIEscapedCharacters(
15                 "%5Chello%5cworld%20foo%20bar%21"),
16             "\\hello\\world foo bar!");
17 }
18