summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2025-12-31test: add pdf-roll tests and fix defcustom bugVedang Manerikar
Add automated tests for pdf-roll functionality: - pdf-roll-page-to-pos utility function - pdf-roll-page-at-current-pos with various positions - Customization defaults - Symbol properties - Minor mode keymap existence Fix bug in pdf-roll-margin-color defcustom where the :set function didn't actually set the variable value.
2025-12-31fix(pdf-view): replace obsolete registerv-make with cl-defstructVedang Manerikar
The registerv-make function was deprecated in Emacs 27.1. Replace it with a proper cl-defstruct (pdf-view-register) and cl-defmethod implementations for register-val-jump-to, register-val-describe, and register-val-insert. Add tests for the register API used by pdf-view: - pdf-view-registerv-make-creates-register: verifies register creation - pdf-view-register-val-insert: verifies insert method works - pdf-view-position-to-register-stores-position: verifies store/retrieve Fixes: #333
2023-01-16Make selection style configurable by introducing a new variablelennonhill
Make selection-style configurable via `pdf-view-selection-style`. A default value of `word` might be desirable, as selection is usually intended to select entire words is perceptually faster than glyph-based selection. This affects selections and highlights, but not search. Limitation: The selection type is fixed for all currently selected regions. Selecting multiple regions with different selection styles at the same time would require storing the selection style for every region and replacing the protocol for `cmd_addannot` with a more flexible one, e.g. the keyword-based one used by `cmd_renderpage`. Closes: #73
2022-10-10Remove guards in `pdf-virtual` tests and code.Vedang Manerikar
This is dead-code for supporting Emacs <26.3 Relates to: #26
2022-08-22Don't depend on gcc when building with `nix-shell` (#135)Mario Rodas
* Use `--run` flag to execute nix-shell The `--command` flag is only required to spawn a interactive shell. * Do not require gcc to build with nix-shell `nix-shell` already sets CC with a C compiler, for instance Clang on darwin. * Remove outdated require in test-helper `f.el` is not needed anywhere.
2021-12-31Indentation and code-quality fixesVedang Manerikar
- Remove :group arguments from `defcustom` declarations - `defcustom` picks up `defgroup` names from the same file, so specifying the group is not necessary - Ensure that all function-names are properly quoted using #' - Add an explicit header-option setting lexical-binding to t - Ensure that cl-check-type uses `satisfies` for filenames - Replace all `defadvice` with `advice-add` - Replace `(list ...)` patterns with `\`(...)` patterns Fixes: #62 Fixes: #32 Partially Fixes: #24
2019-01-11Add test for `pdf-cache-get-image`Nathaniel Nicandro
2018-10-20Add tests for pdf-loader.elAndreas Politz
2017-09-14Do not provide the test-helper featureJonas Bernoulli
"test-helper.el" isn't a library intended to be loaded with `require`. Instead it is loaded with `load` by `ert-runner` itself. Because of that, it is confusing to provide a feature using `provide`. It also isn't possible to use `require' to load `test-helper` because that might, depending on the order of `load-path` load the "test-helper.el" of another package that used `ert-runner`. This is also discussed at rejeep/ert-runner.el#38.
2017-09-12Merge pull request 174Andreas Politz
2017-08-11Fix trailing whitespaceAndreas Politz
2017-08-10Utilize the variable cask-elpaAndreas Politz
2017-01-27Add tests for encrypted documentsAndreas Politz
2017-01-20Output server errors when running testsAndreas Politz
2017-01-19Adapt to changes regarding usage of Emacs version namesAndreas Politz
2015-11-11Fixes test set-upAndreas Politz
Use package-directory-list instead of copying the files.
2015-06-20Fix &rest arg in VPDF adapterAndreas Politz
* lisp/pdf-virtual.el (pdf-virtual-define-adapter, renderpage, setoptions): * test/pdf-virtual.ert (pdf-virtual-adapter-argument-handling): Test it.
2015-06-20Skip some tests for older EmacsAndreas Politz
* test/pdf-virtual.ert: Skip if < 24.4.
2015-06-18Copy casks elpa when runnging testsAndreas Politz
* test/run-tests.el (package-user-dir): Copy the directory tree.
2015-06-13Fix page mapping.Andreas Politz
* lisp/pdf-virtual.el (pdf-virtual-document-page-of): Allow the result to be limited. (pdf-virtual--perform-search): Limit matches to the searched pages. * test/pdf-virtual.ert (pdf-virtual-document-page-of): Adjust test.
2015-06-12Added VPDF feature.Andreas Politz
* lisp/pdf-virtual.el: New file handling virtual PDF documents. * test/pdf-test.el: Tests for that feature. * lisp/pdf-misc.el: Extend the menu appropriately. * lisp/pdf-view.el: Make pdf-view-mode play nicer with it's derived mode pdf-virtual-view-mode. * lisp/pdf-tools.el: Integrate pdf-virtual. * NEWS: Added item. * README.org: Mention it.
2015-06-11Simplify pdf-info interface.Andreas Politz
* lisp/pdf-tools.el: Add let-alist as requirement. * lisp/pdf-occur.el (pdf-occur-add-matches, pdf-occur-start-search): Use new interface. * lisp/pdf-isearch.el (pdf-isearch-search-page): Use new interface. * lisp/pdf-info.el (pdf-info-query--transform-action, pdf-info-query--transform-response): Prefer alists over trees or positional lists, where appropriate. (pdf-info-search-string,pdf-info-search-regexp,pdf-info-pagelinks pdf-info-charlayout,pdf-info-pagelinks, pdf-info-outline, pdf-info-synctex-forward-search, pdf-info-synctex-backward-search): Updated documentation. * test/pdf-info.ert: Require let-alist, use new interface. * Makefile (bytecompile, test): Use cask. * Cask (depends-on): Add let-alist. * lisp/pdf-outline.el: Use new interface. * lisp/pdf-links.el: Use new interface. * lisp/pdf-cache.el: Use new interface. * lisp/pdf-sync.el: Use new interface.
2015-04-14Make compiler happy.Andreas Politz
2015-04-14Workaround semantic bug.Andreas Politz
* lisp/tablist-filter.el (python-mode-hook): Loading semantic/wisent/comp installs a python hook, avoid it.
2015-04-10Improve feedback if epdfinfo is not in working.Andreas Politz
* lisp/pdf-info.el (pdf-info-check-epdfinfo): New function: Send a simple command and check for errors. (pdf-info-process-assert-running): Use it. * test/pdf-info.ert (pdf-info-check-epdfinfo): Test it.
2015-04-09Added pdf-view tests.Andreas Politz
2015-04-09Moved test helper functions to run-test.elAndreas Politz
2015-02-13Don't fix skip-unless function.Andreas Politz
* test/pdf-info.ert (skip-unless): Don't skip if arg is non-nil.
2015-02-13Fix renaming of textlayout in a test.Andreas Politz
* test/pdf-info.ert (pdf-info-textlayout):
2015-02-13Adde more tests.Andreas Politz
* test/pdf-util.ert: * test/pdf-sync.ert:
2015-02-12Added empty test page.Andreas Politz
* test/test.tex: Add empty page. * test/pdf-info.ert (pdf-test-with-test-pdf): Moved to run-tests.el (pdf-info-number-of-pages): Adjust. * test/run-tests.el:
2015-02-08Don't test buggy features.Andreas Politz
* test/pdf-info.ert (pdf-info-getannots): Annotations seem to be somewhat broken in poppler 0.18.
2015-02-08Compatibility with older Emacs.Andreas Politz
* test/pdf-info.ert(skip-unless): Fake skipped tests as accepted failures.
2015-02-08Don't test buggy features.Andreas Politz
* test/pdf-info.ert (pdf-info-getannot): Annotations seem to be somewhat broken in poppler 0.18.
2015-02-08Don't test unsupported features.Andreas Politz
* test/pdf-info.ert (pdf-info-addannot, pdf-info-delannot, pdf-info-mvannot, pdf-info-save, pdf-info-editannot): Only run those if writing annotations is supported.
2015-02-04Fix undefined function usage.Andreas Politz
* test/pdf-info.ert (pdf-info-pagelinks): caddr is a cl function, use car + cddr instead.
2015-02-04Update test PDF file.Andreas Politz
* test/test.tex:
2015-02-04Start tests in a fresh server process.Andreas Politz
* test/pdf-info.ert (pdf-test-with-test-pdf): Added `pdf-info-quit`.
2015-02-02Added more tests.Andreas Politz
* test/pdf-info.ert (pdf-info):
2015-01-21Changed built system.Andreas Politz
* test/run-tests.el (file-name-directory): Run tests on the installed package. * server/configure.ac: Get the version from the toplevel Makefile. * README.org: Adjust installation instructions. * Makefile: Don't require cask anymore. * Cask: Adjust dependencies. * .gitignore: Add package files.
2015-01-14Restructured test handling.Andreas Politz
2015-01-14Moved files.Andreas Politz