current_path.cc: Use canonical paths for comparisons.
authorJonathan Wakely <jwakely@redhat.com>
Thu, 30 Jul 2015 12:41:33 +0000 (13:41 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 30 Jul 2015 12:41:33 +0000 (13:41 +0100)
* testsuite/experimental/filesystem/operations/current_path.cc: Use
canonical paths for comparisons.

From-SVN: r226402

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/experimental/filesystem/operations/current_path.cc

index 806d3d9bab90209428b9710c3e2e0ab72cfaca4b..5f87dddaa6f2a7059a7880cf245497ed70bbba11 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-30  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/experimental/filesystem/operations/current_path.cc: Use
+       canonical paths for comparisons.
+
 2015-07-30  Tim Shen  <timshen@google.com>
 
        * include/bits/regex_automaton.h (_State_base, _State<>):
index 325a5a852fd494b3a9768690bb09494288c50b6d..c242ac0e3996be737d55b0a4895dc6d5d8535be7 100644 (file)
@@ -42,11 +42,11 @@ test02()
   auto oldwd = fs::current_path();
   auto tmpdir = fs::temp_directory_path();
   current_path(tmpdir);
-  VERIFY( fs::current_path() == tmpdir );
+  VERIFY( canonical(fs::current_path()) == canonical(tmpdir) );
   std::error_code ec;
   current_path(oldwd, ec);
-  VERIFY( fs::current_path() == oldwd );
-  VERIFY( fs::current_path(ec) == oldwd );
+  VERIFY( canonical(fs::current_path()) == canonical(oldwd) );
+  VERIFY( canonical(fs::current_path(ec)) == canonical(oldwd) );
 }
 
 int