From b8ee9607323294916073529c4c36ff2e58ca7686 Mon Sep 17 00:00:00 2001 From: Ryo Nakamura Date: Tue, 1 Nov 2022 00:34:40 +0900 Subject: [PATCH] add test_transfer_zero_bytes --- test/README.md | 11 +++++++++++ test/test_e2e.py | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 test/README.md diff --git a/test/README.md b/test/README.md new file mode 100644 index 0000000..fc181b6 --- /dev/null +++ b/test/README.md @@ -0,0 +1,11 @@ + +This test assumes that the user executing the test can ssh to the +localhost without password. + +- Run pytest through ctest. + +```console +cd build +cmake .. +make test # or make test ARGS='-V' +``` diff --git a/test/test_e2e.py b/test/test_e2e.py index e2fd9d1..3091255 100644 --- a/test/test_e2e.py +++ b/test/test_e2e.py @@ -160,3 +160,10 @@ def test_cannot_override_file_with_dir(mscp, src_prefix, dst_prefix): src.cleanup() dst.cleanup() +@pytest.mark.parametrize("src_prefix, dst_prefix", param_remote_prefix) +def test_transfer_zero_bytes(mscp, src_prefix, dst_prefix): + src = File("src", size = 0).make() + run2ok([mscp, src_prefix + src.path, dst_prefix + "dst"]) + src.cleanup() + +