aboutsummaryrefslogtreecommitdiff
path: root/tests/path-entry
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-03-03 16:28:33 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-03-03 16:28:33 +0300
commit33f841eba0667c770c3a79c1af36444ecdffca67 (patch)
tree2e540eb3d3633e25723b92b28953e0161ad9d155 /tests/path-entry
parent3045a5709df597526f474aa0c5a583a76d9921db (diff)
Revert previous (erroneously pushed to master) commit
Diffstat (limited to 'tests/path-entry')
-rw-r--r--tests/path-entry/driver.cxx22
-rw-r--r--tests/path-entry/testscript9
2 files changed, 3 insertions, 28 deletions
diff --git a/tests/path-entry/driver.cxx b/tests/path-entry/driver.cxx
index e4dddf3..d48bf49 100644
--- a/tests/path-entry/driver.cxx
+++ b/tests/path-entry/driver.cxx
@@ -25,36 +25,20 @@ import butl.filesystem;
using namespace std;
using namespace butl;
-// Usage: argv[0] [-l] <path>
+// Usage: argv[0] <path>
//
// If path entry exists then print it's type and size (meaningful for the
// regular file only) to STDOUT, and exit with the zero code. Otherwise exit
// with the one code. Don't follow symlink. On failure print the error
// description to STDERR and exit with the two code.
//
-// -l
-// Follow symlinks.
-//
int
main (int argc, const char* argv[])
try
{
- bool follow_symlinks (false);
-
- int i (1);
- for (; i != argc; ++i)
- {
- string v (argv[i]);
-
- if (v == "-l")
- follow_symlinks = true;
- else
- break;
- }
-
- assert (i == argc - 1);
+ assert (argc == 2);
- auto es (path_entry (argv[i], follow_symlinks));
+ auto es (path_entry (argv[1]));
if (!es.first)
return 1;
diff --git a/tests/path-entry/testscript b/tests/path-entry/testscript
index 35b6f6f..456f96f 100644
--- a/tests/path-entry/testscript
+++ b/tests/path-entry/testscript
@@ -25,15 +25,6 @@
directory
/.
EOO
-
- : followed-symlink
- :
- cat <:'abc' >=f;
- ln -s f l;
- $* -l l >>EOO
- regular
- 3
- EOO
}
: non-existent