Lines Matching refs:atf

2 // Automated Testing Framework (atf)
38 #include "atf-c++/macros.hpp"
40 #include "atf-c++/detail/exceptions.hpp"
41 #include "atf-c++/detail/fs.hpp"
69 using atf::atf_run::temp_dir;
71 atf::fs::path t1("non-existent");
72 atf::fs::path t2("non-existent");
75 atf::fs::path tmpl("testdir.XXXXXX");
83 ATF_REQUIRE(!atf::fs::exists(tmpl));
84 ATF_REQUIRE( atf::fs::exists(t1));
85 ATF_REQUIRE( atf::fs::exists(t2));
87 atf::fs::file_info fi1(t1);
98 atf::fs::file_info fi2(t2);
111 ATF_REQUIRE(!atf::fs::exists(t1));
113 ATF_REQUIRE(!atf::fs::exists(t2));
128 using atf::atf_run::cleanup;
136 atf::fs::path p("root");
137 ATF_REQUIRE(atf::fs::exists(p));
138 ATF_REQUIRE(atf::fs::exists(p / "dir"));
139 ATF_REQUIRE(atf::fs::exists(p / "dir/1"));
140 ATF_REQUIRE(atf::fs::exists(p / "dir/2"));
141 ATF_REQUIRE(atf::fs::exists(p / "reg"));
143 ATF_REQUIRE(!atf::fs::exists(p));
153 using atf::atf_run::cleanup;
160 cleanup(atf::fs::path("aux/root"));
161 ATF_REQUIRE(atf::atf_run::is_root());
162 } catch (const atf::system_error& e) {
163 ATF_REQUIRE(!atf::atf_run::is_root());
175 using atf::atf_run::cleanup;
184 const atf::fs::path p("root");
186 ATF_REQUIRE(!atf::fs::exists(p));
196 using atf::atf_run::change_directory;
197 using atf::atf_run::get_current_dir;
203 const atf::fs::path old = get_current_dir();
205 ATF_REQUIRE_THROW(atf::system_error,
206 change_directory(atf::fs::path("files/reg")));
209 atf::fs::path old2 = change_directory(atf::fs::path("files"));
211 atf::fs::path old3 = change_directory(atf::fs::path("dir"));
213 atf::fs::path old4 = change_directory(atf::fs::path("../.."));
225 using atf::atf_run::change_directory;
226 using atf::atf_run::get_current_dir;
232 atf::fs::path curdir = get_current_dir();
233 change_directory(atf::fs::path("."));
235 change_directory(atf::fs::path("files"));
237 change_directory(atf::fs::path("dir"));
239 change_directory(atf::fs::path(".."));
241 change_directory(atf::fs::path(".."));