Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: test/DefaultFileSystem.cpp

Issue 10421060: Make sure to work properly with Unicode paths on Windows (Closed)
Patch Set: Created May 14, 2013, 1:38 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« src/DefaultFileSystem.cpp ('K') | « src/DefaultFileSystem.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 #include <AdblockPlus.h> 18 #include <AdblockPlus.h>
19 #include <gtest/gtest.h> 19 #include <gtest/gtest.h>
20 20
21 #include "../src/Utils.h" 21 #include "../src/Utils.h"
22 22
23 namespace 23 namespace
24 { 24 {
25 const std::string testPath = "libadblockplus-test-file"; 25 const std::string testPath = "libadblockplus-t\xc3\xa4st-file";
26 26
27 void WriteString(AdblockPlus::FileSystem& fileSystem, 27 void WriteString(AdblockPlus::FileSystem& fileSystem,
28 const std::string& content) 28 const std::string& content)
29 { 29 {
30 std::tr1::shared_ptr<std::stringstream> input(new std::stringstream); 30 std::tr1::shared_ptr<std::stringstream> input(new std::stringstream);
31 *input << content; 31 *input << content;
32 fileSystem.Write(testPath, input); 32 fileSystem.Write(testPath, input);
33 } 33 }
34 } 34 }
35 35
(...skipping 28 matching lines...) Expand all
64 const std::string newTestPath = testPath + "-new"; 64 const std::string newTestPath = testPath + "-new";
65 fileSystem.Move(testPath, newTestPath); 65 fileSystem.Move(testPath, newTestPath);
66 result = fileSystem.Stat(testPath); 66 result = fileSystem.Stat(testPath);
67 ASSERT_FALSE(result.exists); 67 ASSERT_FALSE(result.exists);
68 result = fileSystem.Stat(newTestPath); 68 result = fileSystem.Stat(newTestPath);
69 ASSERT_TRUE(result.exists); 69 ASSERT_TRUE(result.exists);
70 fileSystem.Remove(newTestPath); 70 fileSystem.Remove(newTestPath);
71 result = fileSystem.Stat(newTestPath); 71 result = fileSystem.Stat(newTestPath);
72 ASSERT_FALSE(result.exists); 72 ASSERT_FALSE(result.exists);
73 } 73 }
OLDNEW
« src/DefaultFileSystem.cpp ('K') | « src/DefaultFileSystem.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld