summaryrefslogtreecommitdiff
path: root/test/lisp/vc
Commit message (Collapse)AuthorAgeFilesLines
* Stop using a dynamically bound 'generated-autoload-file' variableLars Ingebrigtsen2020-10-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/loading.texi (Autoload): Document change of name (bug#39823). * lisp/emacs-lisp/autoload.el (autoload-find-generated-file): Pass the file name in. (autoload-generated-file): Ditto. (autoload-file-load-name): Ditto. (generate-file-autoloads): Ditto. (autoload--setup-output): Ditto. (autoload-generate-file-autoloads): Ditto, and alter doc string to reflect when `generated-autoload-file' is heeded. (update-file-autoloads): Pass outfile in to functions. (autoload-find-destination): Ditto. (update-directory-autoloads): Make into an obsolete shim around `make-directory-autoloads'. (make-directory-autoloads): Renamed from `update-directory-autoloads' with new semantics. (batch-update-autoloads): Adjust caller. * lisp/emacs-lisp/package.el (package-generate-autoloads): Adjust caller.
* Merge from origin/emacs-27Glenn Morris2020-09-201-3/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | df04f3e755 Fix a rare segfault in syntax.c fd1fe1e1ec Add doc to syntax-propertize-function saying it must do a ... fcd599bbea Minor copyedits of doc of 'with-silent-modifications' 759399cdb1 Improve documentation of 'max-mini-window-height' 3223302aa2 Use modern constant names for the NS pasteboard 985703d380 Fix doc string of 'toggle-menu-bar-mode-from-frame' 184a4977c7 Make vc-bzr tests work with brz 3.1 (bug#43314) # Conflicts: # lisp/emacs-lisp/syntax.el # src/syntax.c
| * Make vc-bzr tests work with brz 3.1 (bug#43314)Glenn Morris2020-09-121-3/+16
| | | | | | | | | | | | * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) (vc-bzr-test-bug9781, vc-bzr-test-faulty-bzr-autoloads): Make them work with brz 3.1.
* | Mark some diff tests as failing in nonascii directoriesGlenn Morris2020-09-121-0/+9
| | | | | | | | | | | | | | | | * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock) (diff-mode-test-font-lock-syntax-one-line): Expect failure in non-ascii directories. ; * lisp/vc/diff-mode.el (diff-hunk-file-names): Comment.
* | Fix svn tests on MacosLars Ingebrigtsen2020-08-041-1/+2
| | | | | | | | | | | | | | * test/lisp/vc/vc-tests.el (vc-test--svn-enabled): Macos machines may have a dummy svn program that helpfully just outputs "There's no svn program here", so also test for the svnadmin program (bug#42536).
* | Silence some warnings in testsBasil L. Contovounesios2020-06-211-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/package-tests.el (package-test-suffix-matches): Evaluate lambda. (package-test-list-filter-marked): * test/lisp/vc/vc-tests.el (vc-test--run-maybe-unsupported-function): * test/src/undo-tests.el (undo-test-skip-invalidated-markers): Silence "unused local variable" warnings. * test/lisp/imenu-tests.el (imenu-simple-scan-deftest): Fix docstring. Don't shadow global major-mode.
* | Use lexical-binding in most vc testsStefan Kangas2020-04-286-9/+13
|/ | | | | | | | | | | | * test/lisp/vc/add-log-tests.el: * test/lisp/vc/diff-mode-tests.el: * test/lisp/vc/ediff-ptch-tests.el: * test/lisp/vc/smerge-mode-tests.el: * test/lisp/vc/vc-hg-tests.el: * test/lisp/vc/vc-tests.el: Use lexical-binding. * test/lisp/vc/add-log-tests.el (add-log-current-defun-deftest): Silence byte-compiler.
* Handle filling of indented ChangeLog function entriesNoam Postavsky2020-04-041-0/+25
| | | | | | * lisp/vc/log-edit.el (log-edit-fill-entry): Relax regexp a bit to recognize function entries with leading blanks. * test/lisp/vc/log-edit-tests.el: New test.
* Update copyright year to 2020Paul Eggert2020-01-019-9/+9
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* ; Spelling fixesPaul Eggert2019-12-101-11/+10
|
* Improved ChangeLog generation for vc log (Bug#16301)Noam Postavsky2019-08-031-0/+113
| | | | | | | | | | | | | | | | | | | | * lisp/vc/diff-mode.el (diff-find-source-location): Fix docstring. * lisp/vc/add-log.el (change-log-unindented-file-names-re) (change-log-read-entries, change-log-read-defuns) (change-log-insert-entries): * lisp/vc/diff-mode.el (diff-add-log-current-defuns): * lisp/vc/log-edit.el (log-edit--insert-filled-defuns) (log-edit-fill-entry): New functions. (log-edit-mode): Set `log-edit-fill-entry' as `fill-paragraph-function'. (log-edit-generate-changelog-from-diff): New command. (log-edit-mode-map): Bind it to C-c C-w. * doc/emacs/maintaining.texi (Types of Log File, Log Buffer): * CONTRIBUTE: Document it. * etc/NEWS: Announce it. * test/lisp/vc/log-edit-tests.el (log-edit-fill-entry) (log-edit-fill-entry-joining): New tests.
* Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-254-0/+5
| | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* Fixes for "Maintainer:" and related linesPaul Eggert2019-05-194-5/+0
| | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* Fix diff-mode tests after renaming diff-font-lock-refineCharles A. Roelli2019-03-041-2/+2
| | | | | | | | | | | | This fixes tests broken in my last change, "Merge diff-font-lock-refine and diff-auto-refine-mode into diff-refine" from 2019-02-24. * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): Bind diff-refine to symbol 'font-lock' instead of binding diff-font-lock-refine to t. (diff-mode-test-font-lock-syntax-one-line): Bind diff-refine to nil instead of binding diff-font-lock-refine to nil.
* * lisp/tar-mode.el (tar-extract): Call tar--try-jka-compr (bug#34251)Juri Linkov2019-02-031-0/+4
| | | | | | | | | | | | | | | | | | * lisp/tar-mode.el (tar--try-jka-compr): New function copied from archive-try-jka-compr. * lisp/arc-mode.el (archive-try-jka-compr): Set buffer-multibyte to t instead of let-binding coding-system-for-read to 'no-conversion. * test/data/decompress/tg.tar.gz: * test/data/decompress/zg.zip: New fixtures. * test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-gz): * test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-gz): New tests. * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock) (diff-mode-test-font-lock-syntax-one-line): Skip unless shell and diff executables are found.
* * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): New test.Juri Linkov2019-02-021-0/+112
| | | | | | | | | | | | | (diff-mode-test-font-lock-syntax-one-line): New test for one line. * test/data/vc/diff-mode/hello_world.c: * test/data/vc/diff-mode/hello_world_1.c: * test/data/vc/diff-mode/hello_emacs.c: * test/data/vc/diff-mode/hello_emacs_1.c: New fixtures. * lisp/vc/diff-mode.el (diff-syntax-fontify): Move remove-overlays from diff-syntax-fontify-hunk. (Bug#33567) (diff-syntax-fontify-hunk): Remove VISIT arg from insert-file-contents.
* Merge from origin/emacs-26Paul Eggert2018-12-318-8/+8
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-018-8/+8
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
| * Skip a vc-bzr test if run as rootGlenn Morris2018-12-191-0/+3
| | | | | | | | | | | | | | | | * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-faulty-bzr-autoloads): Skip this test when run as root. This works around a race condition in root-specific code in vc-mode-line when deleting a file. ; Do not merge to master, instead fix vc-mode-line there.
* | * test/lisp/vc/vc-tests.el (w32-application-type): Fix declaration.Glenn Morris2018-03-091-1/+1
| |
* | Quieten compilation of some test/lisp filesGlenn Morris2018-03-091-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | * test/lisp/dired-tests.el (dired-test-bug27243-02) (dired-test-bug27243-03, dired-test-bug27899) (dired-test-with-temp-dirs): Remove unused local variables. * test/lisp/hi-lock-tests.el (hi-lock-bug26666) (hi-lock-test-set-pattern): Mark unused arguments. * test/lisp/ses-tests.el (ses-tests-renamed-cells-row-insertion): Remove unused global "ses-tests-trigger". * test/lisp/simple-tests.el (line-number-at-pos-when-passing-point): Remove unused local "pos". * test/lisp/emacs-lisp/benchmark-tests.el (benchmark-tests): Pacify compiler. * test/lisp/emacs-lisp/package-tests.el (package-test-signed): Replace obsolete function epg-configuration. * test/lisp/ls-lisp-tests.el: * test/lisp/eshell/em-ls-tests.el: Require dired. * test/lisp/progmodes/ruby-mode-tests.el (ruby-forward-sexp-skips-method-calls-with-keyword-names): * test/lisp/vc/diff-mode-tests.el (diff-mode-test-ignore-trailing-dashes): Replace interactive funcs.
* Add some test skip conditionsGlenn Morris2018-01-171-2/+4
| | | | | | * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) (vc-bzr-test-bug9781): Skip if bzr is faulty. * test/src/thread-tests.el: Skip if not compiled with threads.
* Fix copyright years by handPaul Eggert2018-01-012-2/+2
| | | | | These are dates that admin/update-copyright did not update, or updated incorrectly.
* Update copyright year to 2018Paul Eggert2018-01-016-6/+6
| | | | Run admin/update-copyright.
* maint: shorten https://lists.gnu.org/archive/html/... linksPaul Eggert2017-11-251-1/+1
|
* Prefer HTTPS to HTTP for gnu.orgPaul Eggert2017-10-011-1/+1
| | | | | | | | | This fixes some URLs I omitted from my previous pass, notably those in lists.gnu.org. Although lists.gnu.org does not yet support TLS 1.1, TLS 1.0 is better than nothing. * lisp/erc/erc.el (erc-official-location): * lisp/mail/emacsbug.el (report-emacs-bug): Use https:, not http:.
* ; Spelling and URL fixesPaul Eggert2017-09-231-1/+1
|
* Allow smerge-keep-current to work for empty hunksTom Tromey2017-09-161-0/+34
| | | | | | | Bug#25555 * lisp/vc/smerge-mode.el (smerge-get-current): Allow point to be at match-end. * test/lisp/vc/smerge-mode-tests.el: New file.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-137-13/+13
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Fix 2 tests that fail in MS-WindowsTino Calancha2017-08-041-17/+31
| | | | | | | | | | | | | | | https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00018.html * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): Add comments to explain the test logic. Pass '--binary' option to 'patch' program in windows environments. Check explicitely that a backup is created before compare file contents. * test/lisp/dired-tests.el (dired-test-bug25609): Declare variable 'dired-dwim-target' right before the test. Add comments to explain the test logic. Ensure, before test the bug condition, that we are displaying the 2 dired buffers created in this test, and no other dired buffer is shown.
* Give test files a -tests.el suffixPhilipp Stephani2017-06-091-2/+2
| | | | | | Rename a couple of test files that have the same name as the library they test. This harmonizes the naming pattern and makes it possible to have the tests directories in the load path.
* Prevent running vc-tests writing to ~/.bzr.logGlenn Morris2017-05-201-7/+38
| | | | | | * test/lisp/vc/vc-tests.el (vc-test--create-repo) (vc-test--register, vc-test--working-revision) (vc-test--checkout-model): Set temporary BZR_HOME, to disable logging.
* Tweak vc-tests.el for bzrGlenn Morris2017-05-011-2/+9
| | | | | * test/lisp/vc/vc-tests.el (vc-test--working-revision): Handle test environments where HOME does not exist.
* ; Tighten up vc-state tests, allowed by the previous changeDmitry Gutov2017-05-011-5/+8
|
* Add unit test for Bug#26378Philipp Stephani2017-04-081-0/+11
| | | | | * test/lisp/vc/ediff-diff-tests.el (ediff-diff-tests--ediff-exec-process--nil): New unit test.
* Make ediff handle remote and quoted file namesPhilipp Stephani2017-04-041-0/+44
| | | | | | | | | | Quoted file names need to be unquoted before passed to subprocesses (Bug#25950). * lisp/vc/ediff-diff.el (ediff-exec-process): Handle remote and quoted file names. * test/lisp/vc/ediff-diff-tests.el (ediff-diff-tests--ediff-exec-process--quoted-file): Add unit test.
* Use only posix options in a ediff-ptch testTino Calancha2017-04-011-10/+15
| | | | | | * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): Use just "-b" patch option. Don't assume a particular suffix for the backup files.
* Tweak ediff-ptch test in previous commit a bit moreTino Calancha2017-04-011-13/+15
| | | | | * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): Apply patches without requiring a shell. Add some comments.
* Tweak an ediff-ptch testGlenn Morris2017-03-311-20/+23
| | | | | * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): Add skip conditions. Avoid going through shell where not needed.
* epatch: Save right backups in Git multipatchesTino Calancha2017-03-211-1/+58
| | | | | | | | | | Multipatches on N Git files save wrong backups for N-1 files; only the last one has a correct backup (Bug#26084). * lisp/vc/diff-mode.el (diff-file-junk-re): Add 'Prereq: ' * lisp/vc/ediff-ptch.el (ediff-map-patch-buffer): Use 'diff-file-junk-re'. * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug25010): Rename from ibuffer-test-bug25010. (ediff-ptch-test-bug26084): New test.
* * test/lisp/vc/diff-mode-tests.el: Require diff-mode.Tino Calancha2017-02-011-0/+4
|
* New test for diff-mode handling trailing --Dima Kogan2017-01-311-0/+199
| | | | test/lisp/vc/diff-mode-tests.el: New test file
* Update copyright year to 2017 in masterPaul Eggert2017-01-011-1/+1
| | | | | | Run admin/update-copyright in the master branch. This fixes files that were not already fixed in the emacs-25 branch before it was merged here.
* Merge from origin/emacs-25Paul Eggert2017-01-014-4/+4
| | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
* ; Spelling fixesPaul Eggert2016-12-221-1/+1
|
* New test file for ediffTino Calancha2016-12-071-0/+42
| | | | | Fix previous commit. * test/lisp/vc/ediff-ptch-tests.el: New test.
* Remove ‘ert-with-function-mocked’ macro in favour of ‘cl-letf’ macroMichal Nazarewicz2016-06-081-2/+1
| | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-function-mocked): Remove macro in favour of ‘cl-letf’ macro which is more generic. All existing uses are migrated accordingly. The macro has not been included in an official release yet so it should be fine to delete it.
* ; Spelling and quoting fixesPaul Eggert2016-05-011-1/+1
|
* Revert the disputed VC change and update the testsDmitry Gutov2016-04-241-39/+16
| | | | | | | | | | | | | | | | | * lisp/vc/vc-hooks.el (vc-working-revision): Remove the previous change. (vc-state): Same. And update the old, incorrect comment about unregistered files (http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00526.html). * test/lisp/vc/vc-tests.el (vc-test--state): Remove the check calling `vc-state' on default-directory (VC state is undefined for directories). Check that `vc-state' returns nil where it returned `unregistered' before. Remove all checks comparing invocations with the backend passed in explictly and without. (vc-test--working-revision): Remove all checks comparing invocations with the backend passed in explictly and without. Update comments, and add a new one.
* Some improvements in vcMichael Albinus2016-04-241-113/+91
| | | | | | | | | | | | | | | | * lisp/vc/vc-hooks.el (vc-state, vc-working-revision): Check, whether FILE is registered. * lisp/vc/vc-rcs.el (vc-rcs-checkout-model): Return `locking' for nonexistent files. * test/lisp/vc/vc-tests.el (w32-application-type): Declare. (vc-test--revision-granularity-function) (vc-test--unregister-function): Use `vc-call-backend'. (vc-test--run-maybe-unsupported-function): New defmacro. (vc-test--register, vc-test--state, vc-test--working-revision) (vc-test--checkout-model): Use it. Fix also expected results. (vc-test-src02-state, vc-test-rcs04-checkout-model): They pass now.