feat(wpcarro/emacs): Package vector.el
Paying-off more packaging debt... Change-Id: Ide641229d6c8efe70c0fd6c625d07aa1a3be98a0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7395 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com>
This commit is contained in:
parent
cc411ec60a
commit
40eca90857
3 changed files with 41 additions and 26 deletions
20
users/wpcarro/emacs/pkgs/vector/tests.el
Normal file
20
users/wpcarro/emacs/pkgs/vector/tests.el
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Dependencies
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(require 'ert)
|
||||
(require 'vector)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Tests
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(ert-deftest vector-misc-tests ()
|
||||
(let ((xs [1 2 3])
|
||||
(ys [1 2 3]))
|
||||
(should (= 1 (vector-get 0 ys)))
|
||||
(vector-set 0 4 ys)
|
||||
(should (= 1 (vector-get 0 ys)))
|
||||
(should (= 1 (vector-get 0 xs)))
|
||||
(vector-set! 0 4 xs)
|
||||
(should (= 4 (vector-get 0 xs)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue