/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
static OUString getTempDirectoryURL_()
{
OUString aDir;
CPPUNIT_ASSERT_EQUAL_MESSAGE("couldn't get system temp URL",
osl::FileBase::E_None, osl::FileBase::getTempDirURL(aDir)); // This resolves symlinks in the temp path if any
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None,
osl::FileBase::getAbsoluteFileURL(aDir, aDir, aDir)); return aDir;
}
static OUString getTempDirectorySys_()
{
OUString aDir;
CPPUNIT_ASSERT_EQUAL_MESSAGE("couldn't get system temp directory",
osl::FileBase::E_None, osl::FileBase::getSystemPathFromFileURL(getTempDirectoryURL_(), aDir)); return aDir;
}
#ifdef __cplusplus extern"C"
{ #endif
// common used string resource // these common used string will be used as assist resource in test // they are mostly OS independent, some of the resource can be reused // so, a common test data repository will be better since it can be // shared among all test code
// OS dependent/independent definitions/includes // we use FILE_PREFIX for URL prefix, // TEST_PLATFORM for test platform initial, // TEST_PLATFORM_ROOT for root dir in comrresponding platform, // TEST_PLATFORM_TEMP for temp dir in comrresponding platform, // PATH_LIST_DELIMITER for separator of path list in comrresponding platform, // PATH_SEPARATOR for separator in URL or system path in comrresponding platform, // PATH_MAX/MAX_PATH for max path length in comrresponding platform,
// FileType URL, we pick some canonical file in corresponding system for test: // socket, link, etc. // Note that this may be changed in the different platform, so be careful to use.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.