| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| (require 'idris-mode) | ||
| (require 'idris-commands) | ||
| (require 'inferior-idris) | ||
| (require 'idris-ipkg-mode) | ||
| (require 'cl-lib) | ||
| (require 'idris-test-utils) | ||
|
|
||
|
|
||
|
|
||
| ;(idris-test-text-update-command "test-data/CaseSplit.idr" idris-case-split '(lambda (x y) 'eq)) | ||
| (ert-deftest idris-test-idris-run () | ||
| (let ((buffer (find-file "test-data/Empty.idr"))) | ||
| (should buffer) | ||
| (with-current-buffer buffer | ||
| (idris-run) | ||
| (dotimes (_ 5) (accept-process-output nil 0.1)) | ||
| (should idris-process) | ||
| ) | ||
| (kill-buffer)) | ||
| (idris-quit)) | ||
|
|
||
|
|
||
| (ert-deftest idris-test-idris-connect-after-idris-run () | ||
| (let ((buffer (find-file "test-data/Empty.idr"))) | ||
| (with-current-buffer buffer | ||
| (idris-load-file) | ||
| (dotimes (_ 5) (accept-process-output nil 0.1)) | ||
| (should idris-connection) | ||
| (kill-buffer))) | ||
| (idris-quit)) | ||
|
|
||
| (idris-ert-command-action "test-data/CaseSplit.idr" idris-case-split idris-test-eq-buffer) | ||
| (idris-ert-command-action "test-data/MakeLemma.idr" idris-make-lemma idris-test-eq-buffer) | ||
| (idris-ert-command-action "test-data/GenerateDef.idr" idris-generate-def idris-test-eq-buffer) | ||
| (idris-ert-command-action2 "test-data/AddClause.idr" | ||
| idris-add-clause | ||
| idris-test-eq-buffer) | ||
|
|
||
|
|
||
| (null nil) | ||
| (provide 'idris-tests3) | ||
| ;;; idris-tests.el ends here |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| module AddClause | ||
|
|
||
| data Test = A | B | ||
|
|
||
| --++++++++++++++++ | ||
| test : Test -> Int | ||
| test x = ?test_rhs | ||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module AddMissing | ||
| -- (idris-test-run-goto-char #'idris-add-missing) | ||
| data Test = A | B | ||
|
|
||
| test : Test -> Int | ||
| --++ | ||
| test A = 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module CaseSplit | ||
| -- (idris-test-run-goto-char #'idris-case-split) | ||
| -- (idris-test-run-goto-char #'idris-case-dwim) | ||
| data Cases = Case1 | Case2 Int | ||
| testCase : Cases -> Cases | ||
| -- +++ | ||
| testCase var = ?c |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| module GenerateDef | ||
|
|
||
| -- (idris-test-run-goto-char #'idris-generate-def) | ||
| data Test = A | B | ||
| --++ | ||
| test : Test -> Int | ||
|
|
||
| {- | ||
| C-c C-a idris-proof-search | ||
| C-c C-b Prefix Command | ||
| C-c C-c idris-case-dwim | ||
| C-c C-d Prefix Command | ||
| C-c C-e idris-make-lemma | ||
| C-c C-g idris-generate-def | ||
| C-c C-l idris-load-file | ||
| C-c RET idris-add-missing | ||
| C-c C-n idris-load-forward-line | ||
| C-c C-p idris-load-backward-line | ||
| C-c C-r idris-refine | ||
| C-c C-s idris-add-clause | ||
| C-c C-t idris-type-at-point | ||
| C-c C-w idris-make-with-block | ||
| C-c C-z idris-pop-to-repl | ||
| C-c C-S-a idris-proof-search-next | ||
| C-c C-S-g idris-generate-def-next | ||
| C-c C-SPC prop-menu-by-completing-read | ||
| -} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| module MakeLemma | ||
|
|
||
| -- (idris-test-run-goto-char #'idris-make-lemma) | ||
| data Test = A | B | ||
|
|
||
| test : Test -> Test | ||
| -- +++++++++++ | ||
| test x = ?make_lemma | ||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| module MakeWithBlock | ||
|
|
||
| -- (idris-test-run-goto-char #'idris-make-with-block) | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| module Refine | ||
|
|
||
| -- (idris-test-run-goto-char #'idris-refine "f") | ||
|
|
||
| data Test = A | B | ||
|
|
||
| f : Test -> Test | ||
| f = const A | ||
|
|
||
| test : Test -> Test | ||
|
|
||
|
|
||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| module TypeAtPoint | ||
|
|
||
| -- (idris-test-run-goto-char #'idris-type-at-point) | ||
|
|
||
| test : Int -> Integer | ||
|
|
||
| test2 : Int -> Integer | ||
| --+++ | ||
| test2 = test |