realpath.cpp
Go to the documentation of this file.
00001 
00006 /*****************************************************************************
00007 ** Platform Check
00008 *****************************************************************************/
00009 
00010 #include <ecl/filesystem/config.hpp>
00011 #if defined(ECL_PRIVATE_HAS_POSIX_REALPATH)
00012 
00013 /*****************************************************************************
00014 ** Includes
00015 *****************************************************************************/
00016 
00017 //#include <iostream>
00018 #include <string>
00019 #include <gtest/gtest.h>
00020 #include "../../include/ecl/filesystem/realpath.hpp"
00021 
00022 /*****************************************************************************
00023 ** Using
00024 *****************************************************************************/
00025 
00026 /*****************************************************************************
00027 ** Tests
00028 *****************************************************************************/
00029 
00030 TEST(FilesystemTests,realpath) {
00031   std::string abs_path;
00032   std::string rel_path = "./experiment.dslam";
00033 
00034   ecl::realpath(rel_path, abs_path);
00035   // TODO : right now, we have no idea of where this will run. Once we have
00036   // a `pwd` like function later, insert it here to derive the test properly.
00037   //EXPECT_EQ(std::string("Foo"), abs_path);
00038   std::cout << "Absolute path: " << abs_path << std::endl;
00039   SUCCEED();
00040 }
00041 
00042 #endif /* ECL_PRIVATE_HAS_POSIX_REALPATH */
00043 
00044 /*****************************************************************************
00045 ** Main program
00046 *****************************************************************************/
00047 
00048 int main(int argc, char **argv) {
00049 
00050     testing::InitGoogleTest(&argc,argv);
00051     return RUN_ALL_TESTS();
00052 }
00053 
00054 


ecl_filesystem
Author(s): Daniel Stonier
autogenerated on Thu Jun 6 2019 21:17:27