Initial impl of export to intermediate doc formats
This commit is contained in:
parent
c16c360cec
commit
72659c59ab
|
@ -20,6 +20,7 @@ env:
|
|||
- TESTS=doc EVM_EMACS=emacs-24.5-travis
|
||||
- TESTS=doc EVM_EMACS=emacs-25.1-travis
|
||||
- TESTS=doc EVM_EMACS=emacs-git-snapshot-travis
|
||||
- TESTS=doc-edn EVM_EMACS=emacs-25.1-travis
|
||||
- PUBLISH=spacemacs.org EVM_EMACS=emacs-25.1-travis BOT_NAME=emacspace BOT_EMAIL=emacspace@gmail.com
|
||||
- PUBLISH=develop.spacemacs.org EVM_EMACS=emacs-25.1-travis BOT_NAME=emacspace BOT_EMAIL=emacspace@gmail.com
|
||||
global:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,19 @@
|
|||
## Makefile --- Spacemacs EDN tests
|
||||
##
|
||||
## Copyright (c) 2012-2017 Sylvain Benner & Contributors
|
||||
##
|
||||
## Author: smile13241324 <smile13241324@gmail.com>
|
||||
## URL: https://github.com/syl20bnr/spacemacs
|
||||
##
|
||||
## This file is not part of GNU Emacs.
|
||||
##
|
||||
## License: GPLv3
|
||||
|
||||
TEST_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
LOAD_FILES = init.el
|
||||
UNIT_TEST_FILES =
|
||||
FUNC_TEST_FILES = \
|
||||
spacemacs-edn-export-ftest.el
|
||||
|
||||
include ../../spacemacs.mk
|
|
@ -0,0 +1,20 @@
|
|||
(defun dotspacemacs/layers ()
|
||||
(setq-default
|
||||
dotspacemacs-distribution 'spacemacs
|
||||
dotspacemacs-configuration-layers '(
|
||||
(org :variables
|
||||
org-enable-github-support t
|
||||
org-enable-bootstrap-support t
|
||||
org-enable-reveal-js-support t
|
||||
)
|
||||
bibtex
|
||||
(latex :variables
|
||||
latex-enable-auto-fill t
|
||||
latex-enable-folding t
|
||||
)
|
||||
html
|
||||
)))
|
||||
(defun dotspacemacs/init ())
|
||||
(defun dotspacemacs/user-init ())
|
||||
(defun dotspacemacs/config ())
|
||||
(defun dotspacemacs/user-config ())
|
|
@ -0,0 +1,34 @@
|
|||
;;; spacemacs-edn-export-ftest.el --- Spacemacs EDN Export Functional Test File
|
||||
;;
|
||||
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Eugene "JAremko" Yaremenko <w3techplayground@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
(require 'mocker)
|
||||
|
||||
;; ------------------------------------------------------------------------
|
||||
;; Spacemacs Documentation EDN Export Test
|
||||
;; Currently checks whether all org documentation files can be converted to
|
||||
;; Spacemacs-EDN (intermediate documentation format)
|
||||
;; ------------------------------------------------------------------------
|
||||
(ert-deftest test-spacemacs-edn-export ()
|
||||
(when (version<= "25.0.0" emacs-version)
|
||||
(unwind-protect
|
||||
(progn
|
||||
(message "=======================================================")
|
||||
(message "Testing Spacemacs-EDN export+")
|
||||
(message "=======================================================")
|
||||
(require 'core-documentation-edn)
|
||||
(spacemacs/publish-docs-to-edn-concurrently)
|
||||
(message "=======================================================")
|
||||
(message "Testing Spacemacs-EDN export-")
|
||||
(message "======================================================="))
|
||||
(let ((export-dir (concat spacemacs-start-directory "export/")))
|
||||
(if (file-accessible-directory-p export-dir)
|
||||
(delete-directory export-dir t)
|
||||
(error "\"%s\" doesn't exist. We haven't exported anything :("
|
||||
export-dir))))))
|
|
@ -53,44 +53,12 @@
|
|||
(setq current-directory-list (cdr current-directory-list)))
|
||||
files-list))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
;; -----------------------------------------------------------------------------
|
||||
;; Spacemacs Documentation HTML Export Test
|
||||
;; Currently checks whether all org documentation files can be converted to html
|
||||
;; ---------------------------------------------------------------------------
|
||||
;; -----------------------------------------------------------------------------
|
||||
(ert-deftest test-spacemacs-html-export ()
|
||||
(unwind-protect (spacemacs/publish-doc)
|
||||
(delete-directory (concat spacemacs-start-directory
|
||||
"export/")
|
||||
t))
|
||||
;; Activate this to check all external links, beware don't try this on travis bandwith limits will prevent this from finishing
|
||||
;;
|
||||
;; (let ((allFiles (directory-files-recursive_ForOldEmacs (concat spacemacs-start-directory "export/") "\\.html" 9999 "NeverIgnore")))
|
||||
;; (dolist (file allFiles)
|
||||
;; (when (file-readable-p file)
|
||||
;; (with-temp-buffer
|
||||
;; (message "%s" file)
|
||||
;; (insert-file-contents file)
|
||||
;; (while (re-search-forward "\\(?:href\\|src\\)[ \n]*=[ \n]*\"\\([^\"]+?\\)\"" nil t)
|
||||
|
||||
;; ;;Start url validation
|
||||
;; (let ((url (match-string 1))
|
||||
;; (p-current (point))
|
||||
;; (p-mb (match-beginning 0)))
|
||||
;; (save-excursion
|
||||
;; (search-backward "<" nil t)
|
||||
;; (setq p1 (point))
|
||||
;; (search-forward ">" nil t)
|
||||
;; (setq p2 (point)))
|
||||
|
||||
;; (when (and (< p1 p-mb) (< p-current p2) ) ; the “href="…"” is inside <…>
|
||||
;; (if (string-match "^http://\\|^https://" url)
|
||||
;; (progn
|
||||
;; ;; (message "%s%s" "Checking " url)
|
||||
;; (url-retrieve-synchronously url t t)
|
||||
;; )
|
||||
;; ;; Checking for internal links not done yet
|
||||
;; ;; (progn
|
||||
;; ;; (message "%s%s" "Checking " (concat "file://" url))
|
||||
;; ;; (url-retrieve-synchronously (concat "file://" url) t))
|
||||
;; ))))))))
|
||||
)
|
||||
t)))
|
||||
|
|
Loading…
Reference in New Issue