# Copyright (C) 2013 INRIA
#
# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation;
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
os.remove(f1.name)
shutil.rmtree(dirpath)
- def test_rcopy_slist(self):
+ def test_rcopy_list(self):
env = test_environment()
user = getpass.getuser()
host = "localhost"
f1.close()
f1.name
- source = "%s;%s" % (dirpath, f1.name)
+ # Copy a list of files
+ source = [dirpath, f1.name]
destdir = tempfile.mkdtemp()
dest = "%s@%s:%s" % (user, host, destdir)
- rcopy(source, dest, port = env.port, agent = True, recursive = True)
+ ((out, err), proc) = rcopy(source, dest, port = env.port, agent = True, recursive = True)
files = []
def recls(files, dirname, names):
files.extend(names)
os.path.walk(destdir, recls, files)
-
+
origfiles = map(lambda s: os.path.basename(s), [dirpath, f.name, f1.name])
self.assertEquals(sorted(origfiles), sorted(files))