path: root/t/
AgeCommit message (Collapse)Author
2018-07-16t9119: fix broken &&-chainsEric Sunshine
Signed-off-by: Eric Sunshine <> Signed-off-by: Junio C Hamano <> use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto <> Signed-off-by: Junio C Hamano <>
2014-09-14git svn: info: correctly handle absolute path argsEric Wong
Calling "git svn info $(pwd)" would hit: "Reading from filehandle failed at ..." errors due to improper prefixing and canonicalization. Strip the toplevel path from absolute filesystem paths to ensure downstream canonicalization routines are only exposed to paths tracked in git (or SVN). v2: Thanks to Andrej Manduch for originally noticing the issue and fixing my original version of this to handle more corner cases such as "/path/to/top/../top" and "/path/to/top/../top/file" as shown in the new test cases. v3: Fix pathname portability problems pointed out by Johannes Sixt with a hint from brian m. carlson. Cc: Johannes Sixt <> Cc: "brian m. carlson" <> Signed-off-by: Andrej Manduch <> Signed-off-by: Eric Wong <>
2010-12-07t9119: do not compare "Text Last Updated" line from "svn info"Junio C Hamano
On the "Text Last Updated" line, "git svn info <file>" does not give the timestamp of the commit that touched the path most recently, unlike "svn info <file>". Do not expect the output from two commands to match on these lines. There was a "ptouch" attempt to transplant the timestamp from svn working tree files to corresponding git working tree files, which mostly hid this difference, but is made pointless now with this change. Remove the helper function and calls to it. Signed-off-by: Junio C Hamano <>
2010-09-09tests: subshell indentation stylefixJonathan Nieder
Format the subshells introduced by the previous patch (Several tests: cd inside subshell instead of around, 2010-09-06) like so: ( cd subdir && ... ) && This is generally easier to read and has the nice side-effect that this patch will show what commands are used in the subshell, making it easier to check for lost environment variables and similar behavior changes. Cc: Jens Lehmann <> Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
2010-09-06Several tests: cd inside subshell instead of aroundJens Lehmann
Fixed all places where it was a straightforward change from cd'ing into a directory and back via "cd .." to a cd inside a subshell. Found these places with "git grep -w "cd \.\.". Signed-off-by: Jens Lehmann <> Signed-off-by: Junio C Hamano <>
2010-06-25tests: Skip tests in a way that makes sense under TAPÆvar Arnfjörð Bjarmason
SKIP messages are now part of the TAP plan. A TAP harness now knows why a particular test was skipped and can report that information. The non-TAP harness built into Git's test-lib did nothing special with these messages, and is unaffected by these changes. Signed-off-by: Ævar Arnfjörð Bjarmason <> Signed-off-by: Junio C Hamano <> test with svn 1.6.* as wellMichael J Gruber
All tests in t9119 were disabled for subversion versions other than 1.[45].*. Make the test script run with subversion 1.[456].*. Signed-off-by: Michael J Gruber <> Acked-by: Eric Wong <>
2009-05-21git-svn testsuite: use standard configuration for Subversion toolsEygene Ryabinkin
I have tweaked configuration in my ~/.subversion directory, namely I am running auto-properties and automatically adding '$Id$' expansion to every file. This choke the last test named 'proplist' from, because one more property, svn:keywords is automatically added. I had just wrapped svn invocation with the svn_cmd that specifies empty directory via --config-dir argument. Since the latter is the global option, it should be recognized by all svn subcommands, so no regressions will be introduced. Now svn_cmd is used everywhere, not just in the failed test module: this should guard us from the future clashes with user-defined configuration tweaks. Signed-off-by: Eygene Ryabinkin <> Acked-by: Eric Wong <>
2008-09-08t/t91XX git-svn tests: run "git svn" not "git-svn"Nanako Shiraishi
This replaces 'git-svn' with 'git svn' in the tests. Signed-off-by: Nanako Shiraishi <> Signed-off-by: Junio C Hamano <>
2008-09-05git-svn: fix 'info' tests for unknown itemsThomas Rast
The previous tests all expected the results from SVN and Git to be identical, and expected both to return success. This cannot be guaranteed: SVN changed the message style between 1.4 and 1.5, and in 1.5, sets a failure exit code. Change the tests to verify that 'git svn info <item>' sets a failure exit code, and that its output contains the file name. This should hopefully catch all other errors. Signed-off-by: Thomas Rast <> Acked-by: Eric Wong <>
2008-09-05git svn info: always quote URLs in 'info' outputThomas Rast
Changes 'git svn info' to always URL-escape the 'URL' and 'Repository' fields and --url output, like SVN (at least 1.5) does. Note that reusing the escape_url() further down in Git::SVN::Ra is not possible because it only triggers for http(s) URLs. I did not know whether extending it to all schemes would break SVN access anywhere, so I made a new one that quotes in all schemes. Signed-off-by: Thomas Rast <> Acked-by: Eric Wong <>
2008-09-05git svn info: make info relative to the current directoryThomas Rast
Previously 'git svn info <path>' would always treat the <path> as relative to the working directory root, with a default of ".". This does not match the behaviour of 'svn info'. Prepend $(git rev-parse --show-prefix) to the path used inside cmd_info to make it relative to the current working directory. Signed-off-by: Thomas Rast <> Acked-by: Eric Wong <>
2008-09-05git svn info: tests: fix ptouch argument order in setupThomas Rast
The arguments must be <gitwc-path> <svnwc-path>, otherwise it fails to update the timestamps (without setting a failure exit code) and results in bad test output later on. Signed-off-by: Thomas Rast <> Acked-by: Eric Wong <>
2008-09-05git svn info: tests: use test_cmp instead of git-diffThomas Rast
git-diff does not appear to return the correct exit values, and gives a false success for more than half (!) of the tests due to the space in "trash directory" which git-svn fails to encode. Signed-off-by: Thomas Rast <> Acked-by: Eric Wong <>
2008-09-05git svn info: tests: do not use set -eThomas Rast
Exiting in the middle of a test confuses the test suite, which will just say "FATAL: Unexpected exit with code 1" in response to a failed test, instead of actually diagnosing failure and continuing with the next test. Signed-off-by: Thomas Rast <> Acked-by: Eric Wong <>
2008-09-05git svn info: tests: let 'init' test run with SVN 1.5Thomas Rast
Signed-off-by: Thomas Rast <> Acked-by: Eric Wong <>
2008-08-06t9119: conditionally re-enable test depending on svn(1) versionEric Wong
I've tested this with svn 1.4.4 This also adds quoting to make it work odd characters in the trash path. Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2008-08-06Fix race condition in t9119-git-svn-info.shDavid D. Kilzer
Changed the ptouch bash function to use the "Text Last Updated" date reported by 'svn info' when changing the modified time (mtime) of the file/symlink/directory in the git working directory. Previously it used the mtime of the item in the svn working directory, which caused the race condition. [ew: swapped argument order of ptouch() to minimize diff] From: David D. Kilzer <> Signed-off-by: David D. Kilzer <> Acked-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2007-12-12disable t9119 for now.Junio C Hamano
Signed-off-by: Junio C Hamano <>
2007-11-23Make test scripts executable.Junio C Hamano
2007-11-22git-svn: info --url [path]David D. Kilzer
Return the svn URL for the given path, or return the svn repository URL if no path is given. Added 18 tests to t/ Signed-off-by: David D. Kilzer <> Acked-by: Eric Wong <>
2007-11-22git-svn info: implement info commandDavid D. Kilzer
Implement "git-svn info" for files and directories based on the "svn info" command. Note that the -r/--revision argument is not supported yet. Added 18 tests in t/ [ew: small fix to work without arguments on all working directories] Signed-off-by: David D. Kilzer <> Acked-by: Eric Wong <>