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