File: test-puppet.el

package info (click to toggle)
flycheck 36.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,600 kB
  • sloc: lisp: 16,210; python: 718; makefile: 219; cpp: 24; ruby: 23; perl: 21; ada: 17; f90: 16; haskell: 15; javascript: 15; sh: 14; erlang: 14; xml: 14; ansic: 12; php: 9; tcl: 8; fortran: 3; vhdl: 2; awk: 1; sql: 1
file content (34 lines) | stat: -rw-r--r-- 1,550 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
;;; test-puppet.el --- Flycheck Specs: Puppet -*- lexical-binding: t; -*-
;;; Code:
(require 'flycheck-buttercup)
(require 'test-helpers)

(describe "Language Puppet"
  (flycheck-buttercup-def-checker-test puppet-parser puppet parser-error-puppet-4
    (assume (version<= "4" (shell-command-to-string
                             "printf %s \"$(puppet --version)\"")))
    (flycheck-buttercup-should-syntax-check
     "language/puppet/parser-error.pp" 'puppet-mode
     '(3 9 error "Syntax error at '>'" :checker puppet-parser)))

  (flycheck-buttercup-def-checker-test puppet-parser puppet parser-error-puppet-3
    (assume (version<= (shell-command-to-string
                         "printf %s \"$(puppet --version)\"") "4"))
    (flycheck-buttercup-should-syntax-check
     "language/puppet/puppet3-parser-error.pp" 'puppet-mode
     '(4 3 error "Syntax error at 'helloagain'"
         :checker puppet-parser))
    (flycheck-buttercup-should-syntax-check
     "language/puppet/puppet3-parser-multiline-error.pp" 'puppet-mode
     '(4 25 error "Unclosed quote after \"'\" followed by '\\n}\\n...'"
         :checker puppet-parser)))

  (flycheck-buttercup-def-checker-test puppet-lint puppet nil
    (flycheck-buttercup-should-syntax-check
     "language/puppet/warnings.pp" 'puppet-mode
     '(2 nil error "foo::bar not in autoload module layout (autoloader_layout)"
         :checker puppet-lint)
     '(3 nil warning "case statement without a default case (case_without_default)"
         :checker puppet-lint))))

;;; test-puppet.el ends here