|
23 | 23 | ";; Copyright 2021"
|
24 | 24 | ";; All rights reserved"
|
25 | 25 | ""
|
26 |
| - ";; End of file `testsuite.lsip'"))) |
| 26 | + ";; End of file `testsuite.lisp'"))) |
27 | 27 | (file-2
|
28 | 28 | (atelier::join-lines
|
29 | 29 | '("; testsuite.lisp -- The testsuite for Example"
|
|
34 | 34 | ";;;; Copyright © 2017–2022 A. U. Thor"
|
35 | 35 | ";;;; All rights reserved."
|
36 | 36 | ""
|
37 |
| - ";; End of file `testsuite.lsip'"))) |
| 37 | + ";; End of file `testsuite.lisp'"))) |
38 | 38 | (atelier::*linter*
|
39 | 39 | (atelier::find-plain-linter :application/lisp)))
|
| 40 | + (assert-string= file-2 |
| 41 | + (with-fixed-linter-environment |
| 42 | + (atelier::hint-at-file-when-it-lacks-canonical-project-identification file-1))))) |
| 43 | + |
| 44 | +(define-testcase validate-codestyle-0005-hint-at-script-when-it-lacks-canonical-project-identification () |
| 45 | + (let ((file-1 |
| 46 | + (atelier::join-lines |
| 47 | + '("#!/bin/sh" |
| 48 | + "" |
| 49 | + "# testsuite.sh — The testsuite for Example" |
| 50 | + "" |
| 51 | + "# Another Project (https://github.com/acme/another-project)" |
| 52 | + "# This file is part of Another Project." |
| 53 | + "#" |
| 54 | + "# Copyright © 2001 Author" |
| 55 | + "# All rights reserved." |
| 56 | + "" |
| 57 | + "# This file must be used under the terms of the MIT License." |
| 58 | + "# This source file is licensed as described in the file LICENSE, which" |
| 59 | + "# you should have received as part of this distribution. The terms" |
| 60 | + "# are also available at https://opensource.org/licenses/MIT" |
| 61 | + "" |
| 62 | + ": ${TOPLEVELDIR:=$(git rev-parse --show-toplevel)}"))) |
| 63 | + (file-2 |
| 64 | + (atelier::join-lines |
| 65 | + '("#!/bin/sh" |
| 66 | + "" |
| 67 | + "# testsuite.sh — The testsuite for Example" |
| 68 | + "" |
| 69 | + "# Example (https://github.com/acme/example)" |
| 70 | + "# This file is part of Example." |
| 71 | + "#" |
| 72 | + "# Copyright © 2017–2022 A. U. Thor" |
| 73 | + "# All rights reserved." |
| 74 | + "" |
| 75 | + "# This file must be used under the terms of the MIT License." |
| 76 | + "# This source file is licensed as described in the file LICENSE, which" |
| 77 | + "# you should have received as part of this distribution. The terms" |
| 78 | + "# are also available at https://opensource.org/licenses/MIT" |
| 79 | + "" |
| 80 | + ": ${TOPLEVELDIR:=$(git rev-parse --show-toplevel)}"))) |
| 81 | + (atelier::*linter* |
| 82 | + (atelier::find-plain-linter :application/shellscript))) |
40 | 83 | (assert-string= file-2
|
41 | 84 | (with-fixed-linter-environment
|
42 | 85 | (atelier::hint-at-file-when-it-lacks-canonical-project-identification file-1)))))
|
|
0 commit comments