From patchwork Sun Dec 17 00:27:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2, of, 3] tests: fix the check-code rule for testing non-existent files From: Matt Harbison X-Patchwork-Id: 26327 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sat, 16 Dec 2017 19:27:23 -0500 # HG changeset patch # User Matt Harbison # Date 1513445680 18000 # Sat Dec 16 12:34:40 2017 -0500 # Node ID d1fbb07b0b7259ae4ca88434e0eda2a21359f7ec # Parent c0cbd08b9b48e073ae354cd8a7fc6f33f257e735 tests: fix the check-code rule for testing non-existent files I missed this in feecfefeba25. diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -185,7 +185,7 @@ 'use $LOCALIP not an explicit loopback address'), (r'^ (?![>$] ).*\$LOCALIP.*[^)]$', 'mark $LOCALIP output lines with (glob) to help tests in BSD jails'), - (r'^ (cat|find): .*: No such file or directory', + (r'^ (cat|find): .*: \$ENOENT\$', 'use test -f to test for file existence'), (r'^ diff -[^ -]*p', "don't use (external) diff with -p for portability"), diff --git a/tests/test-lfs.t b/tests/test-lfs.t --- a/tests/test-lfs.t +++ b/tests/test-lfs.t @@ -571,8 +571,7 @@ files. Therefore, the files don't exist in the remote store. Use the files in the user cache. - $ find $TESTTMP/repo12/.hg/store/lfs/objects -type f - find: */repo12/.hg/store/lfs/objects*: $ENOENT$ (glob) + $ test -d $TESTTMP/repo12/.hg/store/lfs/objects [1] $ hg --config extensions.share= share repo12 repo13