@Test
  public void testDelete_directory_cantDeleteRoot() throws IOException {
    // delete working directory so that root is empty
    // don't want to just be testing the "can't delete when not empty" logic
    Files.delete(path("/work"));

    try {
      Files.delete(path("/"));
      fail();
    } catch (IOException expected) {
      assertThat(expected.getMessage()).contains("root");
    }

    Files.createDirectories(path("/foo/bar"));

    try {
      Files.delete(path("/foo/bar/../.."));
      fail();
    } catch (IOException expected) {
      assertThat(expected.getMessage()).contains("root");
    }

    try {
      Files.delete(path("/foo/./../foo/bar/./../bar/.././../../.."));
      fail();
    } catch (IOException expected) {
      assertThat(expected.getMessage()).contains("root");
    }
  }
");
    assertThatPath("foo/bar").doesNotMatch("glob:/**");
    assertThatPath("/foo/bar/baz/stuff").matches("glob:/foo/**");
    assertThatPath("/foo/bar/baz/stuff").matches("glob:/*
jimfs/src/test/java/com/google/common/jimfs/JimfsUnixLikeFileSystemTest.java