2017-06-02 16:29:55 +00:00
|
|
|
#include <iomanip>
|
|
|
|
#include <iostream>
|
|
|
|
|
2018-04-07 20:16:55 +00:00
|
|
|
#include "common/test.hpp"
|
|
|
|
#include "utils/command.hpp"
|
|
|
|
#include "utils/file.hpp"
|
2017-06-02 16:29:55 +00:00
|
|
|
|
2018-06-01 13:25:11 +00:00
|
|
|
using namespace polybar;
|
2017-06-02 16:29:55 +00:00
|
|
|
|
2018-06-01 13:25:11 +00:00
|
|
|
TEST(File, expand) {
|
|
|
|
auto cmd = command_util::make_command("echo $HOME");
|
|
|
|
cmd->exec();
|
|
|
|
cmd->tail([](string home) {
|
|
|
|
EXPECT_EQ(home + "/test", file_util::expand("~/test"));
|
|
|
|
});
|
2017-06-02 16:29:55 +00:00
|
|
|
}
|
2018-06-01 13:25:11 +00:00
|
|
|
|