polybar/tests/unit_tests/utils/file.cpp

17 lines
371 B
C++
Raw Normal View History

#include <iomanip>
#include <iostream>
#include "common/test.hpp"
#include "utils/command.hpp"
#include "utils/file.hpp"
2018-06-01 13:25:11 +00:00
using namespace polybar;
2018-06-01 13:25:11 +00:00
TEST(File, expand) {
2019-03-07 06:42:10 +00:00
auto cmd = command_util::make_command<output_policy::REDIRECTED>("echo $HOME");
2018-06-01 13:25:11 +00:00
cmd->exec();
cmd->tail([](string home) {
EXPECT_EQ(home + "/test", file_util::expand("~/test"));
});
}