mirror of https://github.com/polybar/polybar.git
tests: Convert file test to gtest
This commit is contained in:
parent
53c87558c9
commit
78680a6832
|
@ -5,12 +5,13 @@
|
||||||
#include "utils/command.hpp"
|
#include "utils/command.hpp"
|
||||||
#include "utils/file.hpp"
|
#include "utils/file.hpp"
|
||||||
|
|
||||||
int main() {
|
|
||||||
using namespace polybar;
|
using namespace polybar;
|
||||||
|
|
||||||
"expand"_test = [] {
|
TEST(File, expand) {
|
||||||
auto cmd = command_util::make_command("echo $HOME");
|
auto cmd = command_util::make_command("echo $HOME");
|
||||||
cmd->exec();
|
cmd->exec();
|
||||||
cmd->tail([](string home) { expect(file_util::expand("~/test") == home + "/test"); });
|
cmd->tail([](string home) {
|
||||||
};
|
EXPECT_EQ(home + "/test", file_util::expand("~/test"));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue