Jim Porter <[email protected]> writes: Hi Jim,
> There's something unusual happening with how shell escaping works on > MS Windows... pscp works fine for me on Tramp 2.5.0.4, but fails on > quoted files in the development build. See the table at the end for > the results; for consistency with my last set of tests, "tramp-dev2" > is commit 13b41389. However, I also tried with the latest Tramp commit > (0b8bb839), and it seems to fail in the same ways. > > Surprisingly, if I take the very same command from the "Tramp 2.5.0.4 > + pscp" logs and run it in a Windows Console, it fails: > > pscp -scp -p -q -r server:/home/jim/a\ \"quoted\"\ file.txt . > More than one remote source not supported Well ... I should have thought earlier. Tramp calls scp and pscp via start-process, directly. No local shell is invoked for this. See tramp-sh.el, line 2375. So, tests from a local shell will behave differently than from Tramp. > (I still haven't gotten the time to read over the docs on running > Tramp's automated tests. Hopefully I can get to that soon, since it > would be a lot more thorough than my manual tests.) TL;DR: 1. In your Windows shell, tell the test suite the Tramp test directory # set REMOTE_TEMPORARY_FILE_DIRECTORY=/scpx:gandalf:/tmp gandalf is my remote Linux server. For different tests, you can vary the methods. I have applied plink, pscp, psftp, sshx, scpx. 2. Invoke Emacs in batch mode for the tests # "%ProgramFiles%\Emacs\emacs-28.0.50-snapshot\bin\emacs.exe" -Q -batch -L X:\src\tramp\lisp -l X:\src\tramp\test\tramp-tests.el --eval "(ert-run-tests-batch t)" x:\src\tramp is the directory with my recent Tramp sources. The GNU ELPA package lacks the lisp/ subdirectory. In the eval closure, you can specify a test selector. t means to run all tests, 'tramp-test40-special-characters (quoted!) means to run just the special characters test. I recommend the latter while checking special characters; the whole test suite lasts too long. In tramp-tests.el, function tramp--test-special-characters, you can specify what test strings to apply. Change as you want :-) > - Jim Best regards, Michael.
