anchor.diff:      <<"/">> = filename:dirname(<<"/">>),
       <<"/">> = filename:dirname(<<"/usr">>),
       ok.
  -    
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
  
positive.code: 
  absname(Config) when is_list(Config) ->
      case os:type() of
  	{win32, _} -> 
  	    ?line [Drive|_] = ?config(priv_dir, Config),
  	    ?line Temp = filename:join([Drive|":/"], "temp"),
  	    ?line case file:make_dir(Temp) of
  		      ok -> ok;
  		      {error,eexist} -> ok
  		  end,
  	    ?line {ok,Cwd} = file:get_cwd(),
  	    ?line ok = file:set_cwd(Temp),
  	    ?line [Drive|":/temp/foo"] = filename:absname(foo),
  	    ?line [Drive|":/temp/foo"] = filename:absname("foo"),
  	    ?line [Drive|":/temp/../ebin"] = filename:absname("../ebin"),
  	    ?line [Drive|":/erlang"] = filename:absname("/erlang"),
  	    ?line [Drive|":/erlang/src"] = filename:absname("/erlang/src"),
  	    ?line [Drive|":/erlang/src"] = filename:absname("\\erlang\\src"),
  	    ?line [Drive|":/temp/erlang"] = filename:absname([Drive|":erlang"]),
  	    ?line [Drive|":/temp/erlang/src"] =
  		filename:absname([Drive|":erlang/src"]),
  	    ?line [Drive|":/temp/erlang/src"] =
  		filename:absname([Drive|":erlang\\src\\"]),
  	    ?line "a:/erlang" = filename:absname("a:erlang"),
  	    
  	    ?line file:set_cwd([Drive|":/"]),
  	    ?line [Drive|":/foo"] = filename:absname(foo),
  	    ?line [Drive|":/foo"] = filename:absname("foo"),
  	    ?line [Drive|":/../ebin"] = filename:absname("../ebin"),
  	    ?line [Drive|":/erlang"] = filename:absname("/erlang"),
  	    ?line [Drive|":/erlang/src"] = filename:absname("/erlang/src"),
  	    ?line [Drive|":/erlang/src"] = filename:absname(["/erlang",'/src']),
  	    ?line [Drive|":/erlang/src"] = filename:absname("\\erlang\\\\src"),
  	    ?line [Drive|":/erlang"] = filename:absname([Drive|":erlang"]),
  	    ?line [Drive|":/erlang/src"] = filename:absname([Drive|":erlang/src"]),
  	    ?line "a:/erlang" = filename:absname("a:erlang"),
  	    
  	    ?line file:set_cwd(Cwd),
  	    ok;
  	{unix, _} ->
              ?line ok = file:set_cwd("/usr"),
              ?line "/usr/foo" = filename:absname(foo),
              ?line "/usr/foo" = filename:absname("foo"),
              ?line "/usr/../ebin" = filename:absname("../ebin"),
  	    ?line file:set_cwd("/"),
  	    ?line "/foo" = filename:absname(foo),
  	    ?line "/foo" = filename:absname("foo"),
  	    ?line "/../ebin" = filename:absname("../ebin"),
  	    ?line "/erlang" = filename:absname("/erlang"),
  	    ?line "/erlang/src" = filename:absname("/erlang/src"),
  	    ?line "/erlang/src" = filename:absname(["/erl",'ang/s',"rc"]),
  	    ?line "/erlang/src" = filename:absname(["/erl",'a','ng',"/",'s',"rc"]),
  	    ?line "/erlang/src" = filename:absname("/erlang///src"),
  	    ?line "/file_sorter.erl" = filename:absname([file_sorter|'.erl']),
  	    ok
      end.
  
  
  
negative.code: 
  absname_2(Config) when is_list(Config) ->
      case os:type() of
          {win32, _} ->
              [Drive|_] = ?config(priv_dir, Config),
              [Drive|":/temp/foo"] = filename:absname(foo, [Drive|":/temp"]),
              [Drive|":/temp/foo"] = filename:absname("foo", [Drive|":/temp"]),
              [Drive|":/temp/../ebin"] = filename:absname("../ebin",
                                                          [Drive|":/temp"]),
              [Drive|":/erlang"] = filename:absname("/erlang", [Drive|":/temp"]),
              [Drive|":/erlang/src"] = filename:absname("/erlang/src",
                                                        [Drive|":/temp"]),
              [Drive|":/erlang/src"] = filename:absname("\\erlang\\src",
                                                        [Drive|":/temp"]),
              [Drive|":/temp/erlang"] = filename:absname([Drive|":erlang"],
                                                         [Drive|":/temp"]),
              [Drive|":/temp/erlang/src"] = filename:absname([Drive|":erlang/src"],
                                                             [Drive|":/temp"]),
              [Drive|":/temp/erlang/src"] =
                  filename:absname([Drive|":erlang\\src\\"], [Drive|":/temp"]),
              "a:/erlang" = filename:absname("a:erlang", [Drive|":/temp"]),
  
              file:set_cwd([Drive|":/"]),
              [Drive|":/foo"] = filename:absname(foo, [Drive|":/"]),
              [Drive|":/foo"] = filename:absname("foo", [Drive|":/"]),
              [Drive|":/../ebin"] = filename:absname("../ebin", [Drive|":/"]),
              [Drive|":/erlang"] = filename:absname("/erlang", [Drive|":/"]),
              [Drive|":/erlang/src"] = filename:absname("/erlang/src",
                                                        [Drive|":/"]),
              [Drive|":/erlang/src"] = filename:absname("\\erlang\\\\src",
                                                        [Drive|":/"]),
              [Drive|":/erlang"] = filename:absname([Drive|":erlang"],
                                                    [Drive|":/"]),
              [Drive|":/erlang/src"] = filename:absname([Drive|":erlang/src"],
                                                        [Drive|":/"]),
              "a:/erlang" = filename:absname("a:erlang", [Drive|":/"]),
  
              ok;
          _ ->
              "/usr/foo" = filename:absname(foo, "/usr"),
              "/usr/foo" = filename:absname("foo", "/usr"),
              "/usr/../ebin" = filename:absname("../ebin", "/usr"),
  
              "/foo" = filename:absname(foo, "/"),
              "/foo" = filename:absname("foo", "/"),
              "/../ebin" = filename:absname("../ebin", "/"),
              "/erlang" = filename:absname("/erlang", "/"),
              "/erlang/src" = filename:absname("/erlang/src", "/"),
              "/erlang/src" = filename:absname("/erlang///src", "/"),
              ok
      end.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  basename_1(Config) when is_list(Config) ->
      Dog = test_server:timetrap(test_server:seconds(10)),
      "." = filename:basename("."),
      "foo" = filename:basename("foo"),
      "foo" = filename:basename("/usr/foo"),
      "foo.erl" = filename:basename("A:usr/foo.erl"),
      "foo" = filename:basename('/usr/foo'),
      "foo" = filename:basename(["/usr","/","f","o","o"]),
      "foo" = filename:basename(["/usr/",foo]),
      "foo" = filename:basename(["/usr/f",oo]),
      "foo" = filename:basename(["usr/", "foo"]),
      "foo" = filename:basename(["usr/"|foo]),
      "foo" = filename:basename(["usr/foo/"]),
      case os:type() of
          {win32, _} ->
              "foo" = filename:basename(["usr\\foo\\"]),
              "foo" = filename:basename("A:\\usr\\foo"),
              "foo" = filename:basename("A:foo");
          _ ->
              "strange\\but\\true" =
                  filename:basename("strange\\but\\true")
      end,
      test_server:timetrap_cancel(Dog),
      ok.
  
  basename_2(Config) when is_list(Config) ->
      Dog = test_server:timetrap(test_server:seconds(10)),
      "." = filename:basename(".", ".erl"),
      "foo" = filename:basename("foo.erl", ".erl"),
      "foo" = filename:basename('foo.erl', ".erl"),
      "foo" = filename:basename("foo.erl", '.erl'),
      "foo" = filename:basename(["/usr","/","f","oo"], ".erl"),
      "foo.erl" = filename:basename("/usr/foo.erl", ".hrl"),
      "foo.erl" = filename:basename("/usr.hrl/foo.erl", ".hrl"),
      "foo" = filename:basename("/usr.hrl/foo", ".hrl"),
      "foo" = filename:basename("usr/foo/", ".erl"),
      "foo.erl" = filename:basename("usr/foo.erl/", ".erl"),
      "foo.erl" = filename:basename("usr/foo.erl/", '.erl'),
      "foo" = filename:basename(["/usr",'/','f','oo'], ".erl"),
      "foo.erl" = filename:basename(["usr/foo.e",'rl/'], ".erl"),
      case os:type() of
          {win32, _} ->
              "foo" = filename:basename("A:foo", ".erl"),
              "foo.erl" = filename:basename("a:\\usr\\foo.erl", ".hrl"),
              "foo.erl" = filename:basename("c:\\usr.hrl\\foo.erl", ".hrl"),
              "foo" = filename:basename("A:\\usr\\foo", ".hrl");
          _ ->
              "strange\\but\\true" =
                  filename:basename("strange\\but\\true.erl", ".erl"),
              "strange\\but\\true" =
                  filename:basename("strange\\but\\true", ".erl")
      end,
      test_server:timetrap_cancel(Dog),
      ok.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  dirname(Config) when is_list(Config) ->
      case os:type() of
          {win32,_} ->
              "A:/usr" = filename:dirname("A:/usr/foo.erl"),
              "A:usr" = filename:dirname("A:usr/foo.erl"),
              "/usr" = filename:dirname("\\usr\\foo.erl"),
              "/" = filename:dirname("\\usr"),
              "A:" = filename:dirname("A:");
          _ -> true
      end,
      "usr" = filename:dirname("usr///foo.erl"),
      "." = filename:dirname("foo.erl"),
  