t7800-difftool: don't accidentally match tmp dirs
commite3f5da7e60060bacd2910b022e30449213e2370b
authorSZEDER Gábor <szeder.dev@gmail.com>
Sat, 9 Jan 2021 17:05:13 +0000 (9 18:05 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 9 Jan 2021 21:40:32 +0000 (9 13:40 -0800)
tree178660c348de066cd96d7df7d971c488e2a2b423
parent47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc
t7800-difftool: don't accidentally match tmp dirs

In a bunch of test cases in 't7800-difftool.sh' we 'grep' for specific
filenames in 'git difftool's output, and those test cases are prone to
occasional failures because those filenames might be part of the name
of difftool's temporary directory as well, e.g.:

  +git difftool --dir-diff --no-symlinks --extcmd ls v1
  +grep sub output
  +test_line_count = 2 sub-output
  test_line_count: line count for sub-output != 2
  /tmp/git-difftool.Ssubfq/left/:
  sub
  /tmp/git-difftool.Ssubfq/right/:
  sub
  error: last command exited with $?=1
  not ok 50 - difftool --dir-diff v1 from subdirectory --no-symlinks

Fix this by tightening the 'grep' patterns looking for those
interesting filenames to match only lines where a filename stands on
its own.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7800-difftool.sh