tests/test-contrib-emacs.t
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Mon, 15 Apr 2024 16:33:37 +0100
branchstable
changeset 51571 74230abb2504
parent 45449 814c7430f828
permissions -rw-r--r--
match: strengthen visit_children_set invariant, Recursive means "all files" My previous interpretation of "Recursive" was too relaxed: I thought it instructed the caller to do something like this: > you can stop calling `visit_children_set` because you'll need to descend into > every directory recursively, but you should still check every file if it > matches or not Whereas the real instruction seems to be: > I guarantee that everything in this subtree matches, you can stop > querying the matcher for all files and dirs altogether. The evidence to support this: - the test actually passes with the stronger invariant, revealing no exceptions from this rule - the implementation of `visit_children_set` for `DifferenceMatcher` clearly relies on this requirement, so it must hold for that not to lead to bugs.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41788
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
#require emacs
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
  $ emacs -q -no-site-file -batch -l $TESTDIR/../contrib/hg-test-mode.el \
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
  >  -f ert-run-tests-batch-and-exit
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
  Running 1 tests (*) (glob)
45449
814c7430f828 tests: make emacs test less strict
Martin von Zweigbergk <martinvonz@google.com>
parents: 41788
diff changeset
     5
     passed  1/1  hg-test-mode--compilation-mode-support* (glob)
41788
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
  
45449
814c7430f828 tests: make emacs test less strict
Martin von Zweigbergk <martinvonz@google.com>
parents: 41788
diff changeset
     7
  Ran 1 tests, 1 results as expected* (glob)
41788
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     8