Add test to expose a load-time issue
The issue manifests when sclang is compiled. Steps to reproduce in real emacs config: 1. Install the package and compile it 2. Open a file with a `.sc` or `.scd` extension 3. Witness the error `(void-function sclang-make-buffer-name)` Steps to reproduce with the test: 0. install [eldev](https://github.com/doublep/eldev#installation) 1. `eldev compile` 2. `eldev test`
This commit is contained in:
parent
225e810bdd
commit
14157663b0
5 changed files with 28 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,4 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.elc
|
||||||
|
.eldev
|
||||||
|
/el/sclang-autoloads.el
|
||||||
|
|
7
el/Eldev
Normal file
7
el/Eldev
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
; -*- mode: emacs-lisp; lexical-binding: t -*-
|
||||||
|
|
||||||
|
;; Uncomment some calls below as needed for your project.
|
||||||
|
;(eldev-use-package-archive 'gnu)
|
||||||
|
;(eldev-use-package-archive 'melpa)
|
||||||
|
|
||||||
|
(eldev-use-plugin 'autoloads)
|
11
el/sclang.el
11
el/sclang.el
|
@ -1,5 +1,7 @@
|
||||||
;;; sclang.el --- IDE for working with the SuperCollider language
|
;;; sclang.el --- IDE for working with the SuperCollider language
|
||||||
;; copyright 2003 stefan kersten <steve@k-hornz.de>
|
;; Copyright 2003 stefan kersten <steve@k-hornz.de>
|
||||||
|
;; Version: 1.0.0
|
||||||
|
;; URL: https://github.com/supercollider/scel
|
||||||
;;
|
;;
|
||||||
;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
|
@ -16,6 +18,13 @@
|
||||||
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||||
;; USA
|
;; USA
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
;;
|
||||||
|
;; This package provides code for interfacing with sclang and scsynth.
|
||||||
|
;; In order to be useful you need to install SuperCollider and the
|
||||||
|
;; sc-el Quark. See the README or https://github.com/supercollider/scel
|
||||||
|
;; for more information.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(defgroup sclang nil
|
(defgroup sclang nil
|
||||||
"IDE for working with the SuperCollider language."
|
"IDE for working with the SuperCollider language."
|
||||||
|
|
1
el/test/fixtures/super-boring.scd
vendored
Normal file
1
el/test/fixtures/super-boring.scd
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ WhiteNoise.ar(0.2!2); }.play;
|
7
el/test/sclang-mode-test.el
Normal file
7
el/test/sclang-mode-test.el
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
;; -*- no-byte-compile: t; lexical-binding: t; -*-
|
||||||
|
;;; test/sclang-mode-test.el
|
||||||
|
|
||||||
|
(ert-deftest sclang-major-mode-init-test ()
|
||||||
|
"Loading a file with an scd extension should init sclang-mode"
|
||||||
|
(find-file "fixtures/super-boring.scd")
|
||||||
|
(should (eq 'sclang-mode major-mode)))
|
Loading…
Reference in a new issue