File: generate-literate-cases

package info (click to toggle)
ess 18.10.2%2Bgit20220915.f45542e-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,616 kB
  • sloc: lisp: 23,453; makefile: 337; sh: 7
file content (23 lines) | stat: -rwxr-xr-x 908 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env emacs --script
;; (Re)generate files with test cases for indentation

(let ((current-directory (file-name-directory load-file-name)))
  (setq ess-test-path (expand-file-name "." current-directory))
  (setq ess-etest-path (expand-file-name "./etest/" current-directory))
  (setq ess-literate-path (expand-file-name "./literate/" current-directory))
  (setq ess-root-path (expand-file-name "../lisp/" current-directory)))

(add-to-list 'load-path ess-root-path)
(add-to-list 'load-path ess-test-path)
(add-to-list 'load-path ess-etest-path)

(require 'ert)
(require 'ess-r-mode)
(load (expand-file-name "ess-test-literate.el" ess-test-path) nil t)

(message "\nStarting literate tests")

(mapc (lambda (file)
        (elt-do 'regenerate (expand-file-name file ess-literate-path)))
      '("elt.R" "roxy.R" "code-fill.R" "misc.R" "syntax.R" "tokens.R"
        "fontification.R" "keybindings.R"))