xref: /aosp_15_r20/external/libchrome/base/test/generate_fontconfig_caches.cc (revision 635a864187cb8b6c713ff48b7e790a6b21769273)
1 // Copyright 2018 The Chromium 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 <string>
6 
7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h"
9 #include "base/path_service.h"
10 #include "base/test/fontconfig_util_linux.h"
11 
main(void)12 int main(void) {
13   base::SetUpFontconfig();
14   base::TearDownFontconfig();
15 
16   base::FilePath dir_module;
17   CHECK(base::PathService::Get(base::DIR_MODULE, &dir_module));
18   base::FilePath fontconfig_caches = dir_module.Append("fontconfig_caches");
19   CHECK(base::DirectoryExists(fontconfig_caches));
20   base::FilePath stamp = fontconfig_caches.Append("STAMP");
21   CHECK_EQ(0, base::WriteFile(stamp, "", 0));
22 
23   return 0;
24 }
25