Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
85 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
language: generic | ||
sudo: false | ||
before_install: | ||
- curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh | ||
- evm install $EVM_EMACS --use --skip | ||
- cask | ||
env: | ||
- EVM_EMACS=emacs-24.4-travis | ||
- EVM_EMACS=emacs-24.5-travis | ||
- EVM_EMACS=emacs-25.1-travis | ||
- EVM_EMACS=emacs-git-snapshot-travis | ||
script: | ||
- emacs --version | ||
- make test | ||
|
||
notifications: | ||
email: false | ||
|
||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- env: EVM_EMACS=emacs-git-snapshot-travis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CASK ?= cask | ||
EMACS ?= emacs | ||
|
||
all: test | ||
|
||
test: unit | ||
|
||
unit: | ||
${CASK} exec ert-runner | ||
|
||
install: | ||
${CASK} install | ||
|
||
bench: | ||
./bench.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
;;; test-helper.el --- Helper for tests -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2016 Wilfred Hughes | ||
|
||
;; Author: Wilfred Hughes <me@wilfred.me.uk> | ||
|
||
;;; Code: | ||
|
||
(require 'ert) | ||
(require 'f) | ||
|
||
(let ((ag-el-dir (f-parent (f-dirname (f-this-file))))) | ||
(add-to-list 'load-path ag-el-dir)) | ||
|
||
(require 'undercover) | ||
(undercover "ag.el" | ||
(:exclude "*-test.el") | ||
(:report-file "/tmp/undercover-report.json")) | ||
|
||
(provide 'test-helper) | ||
;;; test-helper.el ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
(require 'ert) | ||
(require 'ag) | ||
|
||
(ert-deftest ag--escape-pcre () | ||
(should (equal (ag--escape-pcre "ab.*(") "ab\\.\\*\\("))) | ||
|
||
(ert-deftest ag--longest-string () | ||
(should | ||
(equal (ag--longest-string nil "foo" nil "f" "foobarbaz" "z") | ||
"foobarbaz"))) | ||
|
||
(ert-deftest ag-project () | ||
"Smoke test for what is probably the most useful command in ag.el" | ||
(ag-project "defun") | ||
(should | ||
(equal (buffer-name) | ||
(format "*ag search text:defun dir:%s*" default-directory)))) |