anchor.diff:  -define(TEST_FILE_DATA,   "If this file exists after a completed test an error occurred.").   
   -define(TEST_FILE_DATA2,  "1234567890123").
   
  -
   %%-----------------------------------------------------------------
   %%  aoo-file test
   %%-----------------------------------------------------------------
  -app_test(doc) -> [];
  -app_test(suite) -> [];
   app_test(_Config) ->
  -    ?line ok=?t:app_test(cosFileTransfer),
  +    ok=?t:app_test(cosFileTransfer),
       ok.
   
   %%-----------------------------------------------------------------
   %%  FileIterator API tests 
   %%-----------------------------------------------------------------
  -fileIterator_api(doc) -> ["CosFileTransfer FileIterator API tests.", ""];
  -fileIterator_api(suite) -> [];
   fileIterator_api(Config) ->
       case ftp_host(Config) of
   	{skipped, SkippedReason} ->
   	    {skipped, SkippedReason};
   	Host ->
   	    
  -	    ?line {ok, Node} = create_node("fileIterator_api", 4008, normal),
  -	    ?line ?match(ok, remote_apply(Node, ?MODULE, install_data, 
  +	    {ok, Node} = create_node("fileIterator_api", 4008, normal),
  +	    ?match(ok, remote_apply(Node, ?MODULE, install_data, 
   					  [tcp, {{'NATIVE', 
   						  'cosFileTransferNATIVE_file'}, Host, 
   						 "fileIterator_api"}])),
   	    
               %% Create a Virtual File System.
  -%%    ?line VFS = ?match({_,_,_,_,_,_},
  +%%    VFS = ?match({_,_,_,_,_,_},
   %%		 cosFileTransferApp:create_VFS({'NATIVE', 
   %%						'cosFileTransferNATIVE_file'}, 
   %%					       [], Host, ?FTP_PORT)),
  -	    ?line VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_}, 
  +	    VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_}, 
   				   corba:string_to_object("corbaname::1.2@localhost:4008/NameService#fileIterator_api")),
   
               %% Start two File Transfer Sessions (Source and Target).
  -	    ?line {FS, Dir} = ?matchnopr({{_,_,_},{_,_,_}},
  +	    {FS, Dir} = ?matchnopr({{_,_,_},{_,_,_}},
   			'CosFileTransfer_VirtualFileSystem':login(VFS, 
   								  ?FTP_USER, 
   								  ?FTP_PASS, 
   								  ?FTP_ACC)),
   
               %% Do some basic test on one of the Directories attributes.
  -	    ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(Dir)),
  -	    ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(Dir)),
  -	    ?line ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(Dir)),
  -	    ?line ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(Dir)),
  +	    ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(Dir)),
  +	    ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(Dir)),
  +	    ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(Dir)),
  +	    ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(Dir)),
   	    {ok,[],FileIter} = ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir, 0)),
               %% Usually the working directory for the test is not empty so no need for
               %% creating files of our own?!
  
positive.code: %%-----------------------------------------------------------------
  %%  FileTransferSession API tests 
  %%-----------------------------------------------------------------
  fts_ftp_dir_api(doc) -> ["CosFileTransfer FTP FileTransferSession API tests.", ""];
  fts_ftp_dir_api(suite) -> [];
  fts_ftp_dir_api(Config) ->
      ?line {ok, Node} = create_node("ftp_dir_api", 4009, normal),
      dir_helper(Config, 'FTP', ?TEST_DIR, Node, 4009, "ftp_dir_api").
  
  
  fts_native_dir_api(doc) -> ["CosFileTransfer NATIVE FileTransferSession API tests.", ""];
  fts_native_dir_api(suite) -> [];
  fts_native_dir_api(Config) ->
      ?line {ok, Node} = create_node("native_dir_api", 4010, normal),
      {ok, Pwd} = file:get_cwd(),
      dir_helper(Config, {'NATIVE', 'cosFileTransferNATIVE_file'}, 
  	       filename:split(Pwd), Node, 4010, "native_dir_api").
  
negative.code: 	    io:format("<<<<<< CosFileTransfer Testing Configuration >>>>>>~n",[]),
  	    io:format("Top Dir: ~p~nLevel2 Dir: ~p~n", [TEST_DIR_LEVEL1, TEST_DIR_LEVEL2]),
  	    
  	    ?match(ok, remote_apply(Node, ?MODULE, install_data, 
  					  [tcp, {WhichType, Host, Name}])),
  	    
  	    VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_}, 
  				   corba:string_to_object("corbaname::1.2@localhost:"++integer_to_list(Port)++"/NameService#"++Name)),
  	    
              %% Start two File Transfer Sessions (Source and Target).
  	    {FS, DirS} = ?matchnopr({{'IOP_IOR',_,_}, _},
  					  'CosFileTransfer_VirtualFileSystem':login(VFS, 
  										    ?FTP_USER, 
  										    ?FTP_PASS, 
  										    ?FTP_ACC)),
  
              %% Do some basic test on one of the Directories attributes.
  	    ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(DirS)),
  	    ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(DirS)),
  	    ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(DirS)),
  	    ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(DirS)),
  
              %% Create a Root Directory. Currently we only need to create one but
              %% later on, when supporting other protocols than FTP it's not enough.
  	    Dir1 =  'CosFileTransfer_FileTransferSession':create_directory(FS, 
  										 TEST_DIR_LEVEL1),
  	    io:format("<<<<<< CosFileTransfer Testing Properties >>>>>>~n",[]),
  	    ?match({ok, [tk_long, tk_boolean]}, 
  			 'CosFileTransfer_Directory':get_allowed_property_types(Dir1)),
  	    ?match({ok, [_,_]}, 
  			 'CosFileTransfer_Directory':get_allowed_properties(Dir1)),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':define_property_with_mode(Dir1, 
  									       "num_children",
  									       #any{typecode=tk_long, value=0},
  									       fixed_readonly)),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':define_property_with_mode(Dir1, 
  									       "wrong",
  									       #any{typecode=tk_long, value=0},
  									       fixed_readonly)),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':define_property_with_mode(Dir1, 
  									       "num_children",
  									       #any{typecode=tk_short, value=0},
  									       fixed_readonly)),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':define_property_with_mode(Dir1, 
  									       "num_children",
  									       #any{typecode=tk_long, value=0},
  									       fixed_normal)),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':define_properties_with_modes(Dir1, 
  										  [#'CosPropertyService_PropertyDef'
  										   {property_name  = "num_children", 
  										    property_value = #any{typecode=tk_long, value=0}, 
  										    property_mode  = fixed_readonly}])),
  	    ?match(fixed_readonly, 
  			 'CosFileTransfer_Directory':get_property_mode(Dir1, "num_children")),
  	    ?match({true,
  			  [#'CosPropertyService_PropertyMode'{property_name = "num_children", 
  							      property_mode = fixed_readonly}]}, 
  			 'CosFileTransfer_Directory':get_property_modes(Dir1, ["num_children"])),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':set_property_mode(Dir1, "num_children", fixed_readonly)),
  	    
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':
  			 set_property_modes(Dir1, 
  					    [#'CosPropertyService_PropertyMode'
  					     {property_name = "num_children", 
  					      property_mode = fixed_readonly}])),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':
  			 set_property_modes(Dir1, 
  					    [#'CosPropertyService_PropertyMode'
  					     {property_name = "wrong", 
  					      property_mode = fixed_readonly}])),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':
  			 set_property_modes(Dir1, 
  					    [#'CosPropertyService_PropertyMode'
  					     {property_name = "num_children", 
  					      property_mode = fixed_normal}])),
  	    ?match({'EXCEPTION', _},
  			 'CosFileTransfer_Directory':define_property(Dir1, 
  								     "num_children",
  								     #any{typecode=tk_long, value=0})),
  	    ?match({'EXCEPTION', _},
  			 'CosFileTransfer_Directory':define_property(Dir1, 
  								     "wrong",
  								     #any{typecode=tk_long, value=0})),
  	    ?match({'EXCEPTION', _},
  			 'CosFileTransfer_Directory':define_property(Dir1, 
  								     "num_children",
  								     #any{typecode=tk_short, value=0})),
  	    
  	    ?match({'EXCEPTION', _},
  			 'CosFileTransfer_Directory':define_property(Dir1, 
  								     "num_children",
  								     #any{typecode=tk_long, value=0})),
  
  	    ?match({'EXCEPTION', _},
  			 'CosFileTransfer_Directory':
  			 define_properties(Dir1, 
  					   [#'CosPropertyService_Property'
  					    {property_name = "num_children", 
  					     property_value = #any{typecode=tk_long, 
  								   value=0}}])),
  	    ?match({'EXCEPTION', _},
  			 'CosFileTransfer_Directory':
  			 define_properties(Dir1, 
  					   [#'CosPropertyService_Property'
  					    {property_name = "wrong", 
  					     property_value = #any{typecode=tk_long, 
  								   value=0}}])),
  	    ?match({'EXCEPTION', _},
  			 'CosFileTransfer_Directory':
  			 define_properties(Dir1, 
  					   [#'CosPropertyService_Property'
  					    {property_name = "num_children", 
  					     property_value = #any{typecode=tk_short, 
  								   value=0}}])),
  	    ?match(2, 'CosFileTransfer_Directory':get_number_of_properties(Dir1)),
  
  	    ?match({ok, ["num_children", "is_directory"], {'IOP_IOR',[],[]}}, 
  			 'CosFileTransfer_Directory':get_all_property_names(Dir1, 2)),
  	    ?match({ok, ["is_directory"], _}, 
  			 'CosFileTransfer_Directory':get_all_property_names(Dir1, 1)),
  	    
  	    ?match(#any{}, 
  			 'CosFileTransfer_Directory':get_property_value(Dir1, "num_children")),
  	    ?match(#any{}, 
  			 'CosFileTransfer_Directory':get_property_value(Dir1, "is_directory")),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':get_property_value(Dir1, "wrong")),
  	    
  	    ?match({true, 
  			  [#'CosPropertyService_Property'{property_name = "num_children"}]}, 
  			 'CosFileTransfer_Directory':get_properties(Dir1, ["num_children"])),
  	    ?match({false, 
  			  [#'CosPropertyService_Property'{property_name = "wrong"}]},
  			 'CosFileTransfer_Directory':get_properties(Dir1, ["wrong"])),
  	    
  	    ?match({ok, [_],_}, 
  			 'CosFileTransfer_Directory':get_all_properties(Dir1, 1)),
  	    ?match({ok, [_,_], {'IOP_IOR',[],[]}}, 
  			 'CosFileTransfer_Directory':get_all_properties(Dir1, 2)),
  	    
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':delete_property(Dir1, "num_children")),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':delete_property(Dir1, "wrong")),
  	    
  	    
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':delete_properties(Dir1, ["num_children"])),
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_Directory':delete_properties(Dir1, ["wrong"])),
  	    ?match(false, 'CosFileTransfer_Directory':delete_all_properties(Dir1)),
  	    ?match(true, 
  			 'CosFileTransfer_Directory':is_property_defined(Dir1, "num_children")),
  	    ?match(false, 
  			 'CosFileTransfer_Directory':is_property_defined(Dir1, "wrong")),
  
              %% The Top Dir should be empty and ...
  	    ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)),
  	    ?match( #any{value=0},
  			  'CosPropertyService_PropertySet':get_property_value(Dir1, "num_children")),
              %% Create a sub-directory.
  	    Dir2 = 'CosFileTransfer_FileTransferSession':create_directory(FS, 
  										TEST_DIR_LEVEL2),
  	    ?match( #any{value=1},
  			  'CosPropertyService_PropertySet':get_property_value(Dir1, "num_children")),
  	    
  	    ?match({ok, [_,_], {'IOP_IOR',[],[]}}, 
  			 'CosFileTransfer_Directory':get_all_properties(Dir1, 2)),
  	    {_,_,Iterator1} = ?match({ok, [_], _}, 
  					   'CosFileTransfer_Directory':get_all_properties(Dir1, 1)),
  	    ?match({false, [_]}, 
  			 'CosPropertyService_PropertiesIterator':next_n(Iterator1,4)),
  	    
  	    {_,_,Iterator0} = ?match({ok, [], _}, 
  					   'CosFileTransfer_Directory':get_all_properties(Dir1, 0)),
  	    
  	    ?match({false, [_, {'CosPropertyService_Property',
  				      "num_children",{any,tk_long,1}}]},
  			 'CosPropertyService_PropertiesIterator':next_n(Iterator0,4)),
  	    
  	    ?match({true, 
  			  [#'CosPropertyService_Property'{property_name = "num_children"}]}, 
  			 'CosFileTransfer_Directory':get_properties(Dir1, ["num_children"])),
  	    
              %% The Top Directory is not emtpy any more and ...
  	    {ok,[#'CosFileTransfer_FileWrapper'{the_file = DirRef}],_} = 
  		?matchnopr({ok,[{'CosFileTransfer_FileWrapper', _, ndirectory}],_}, 
  			   'CosFileTransfer_Directory':list(Dir1, 1000)),
              %% ... its name eq. to 'TEST_DIR_LEVEL2'
  	    ?match(TEST_DIR_LEVEL2, 
  			 'CosFileTransfer_Directory':'_get_complete_file_name'(DirRef)),
  	    
  	    #'CosFileTransfer_FileWrapper'{the_file = Dir3} = 
  		?matchnopr({'CosFileTransfer_FileWrapper', _, ndirectory},
  			   'CosFileTransfer_FileTransferSession':get_file(FS, TEST_DIR_LEVEL1)),
  	    
              %% Must get the same result for the 'get_file' operation.
  	    {ok,[#'CosFileTransfer_FileWrapper'{the_file = DirRef2}],_} = 
  		?matchnopr({ok,[{'CosFileTransfer_FileWrapper', _, ndirectory}],_}, 
  			   'CosFileTransfer_Directory':list(Dir3,1000)),
  	    ?match(TEST_DIR_LEVEL2, 
  			 'CosFileTransfer_Directory':'_get_complete_file_name'(DirRef2)),
  	    
              %% Since the top directory isn't empty deleting it must fail.
  	    ?match({'EXCEPTION', _}, 
  			 'CosFileTransfer_FileTransferSession':delete(FS, Dir1)),
  	    
              %% Delete the sub-directory and ...
  	    ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FS, Dir2)),
              %% ... see if the top directory realyy is empty.
  	    ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)),
  
  	    ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FS, Dir1)),
              %% Test if the top directory been removed as intended.
  	    ?match({'EXCEPTION', {'CosFileTransfer_FileNotFoundException', _, _}},
  			 'CosFileTransfer_FileTransferSession':get_file(FS, TEST_DIR_LEVEL1)),
  
  	    ?match(false, corba_object:non_existent(FS)),
  	    ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FS)),
              %% To make sure Orber can remove it from mnesia.
  	    timer:sleep(1000),
  	    ?match(true, corba_object:non_existent(FS)),
  	    ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, [Name])),
  	    stop_orber_remote(Node, normal),
  	    ok
      end.
  