From 290e25509b2f17281195c5217ff9ad851d01ff63 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 24 Jul 2019 20:20:04 -0500 Subject: [PATCH] Tests: Use org-ql-it in more tests --- tests/test-org-ql.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 835b93b..ba30eec 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -351,12 +351,12 @@ Based on Buttercup macro `it'." :to-equal '("Learn universal sign language"))) (describe "(regexp)" - (it "with 1 argument" + (org-ql-it "with 1 argument" (expect (org-ql test-buffer (regexp "Take over") :sort todo :action (org-ql-test-org-get-heading)) :to-equal '("Take over the universe" "Take over the world" "Take over Mars" "Take over the moon" "Get haircut"))) - (it "with 2 arguments" + (org-ql-it "with 2 arguments" (expect (org-ql test-buffer (regexp "Take over" "pizza") :sort todo @@ -376,31 +376,31 @@ Based on Buttercup macro `it'." :to-equal '("Take over the universe" "Take over the world" "Take over Mars" "Take over the moon" "Order a pizza" "Get haircut")))) (describe "(todo)" - (it "without arguments" + (org-ql-it "without arguments" ;; FIXME: This returns an item that is done, which is incorrect. (expect (org-ql test-buffer (todo) :sort todo :action (org-ql-test-org-get-heading)) :to-equal '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp" "Write a symphony"))) - (it "with 1 argument" + (org-ql-it "with 1 argument" ;; FIXME: Figure out why this takes >10x longer than the other (todo) tests, according to Buttercup. (expect (org-ql test-buffer (todo "WAITING") :sort todo :action (org-ql-test-org-get-heading)) :to-equal '("Visit the moon"))) - (it "with 2 arguments" + (org-ql-it "with 2 arguments" (expect (org-ql test-buffer (todo "WAITING" "SOMEDAY") :sort todo :action (org-ql-test-org-get-heading)) :to-equal '("Visit the moon" "Rewrite Emacs in Common Lisp" "Write a symphony")))) (describe "(ts)" - (it "without arguments" + (org-ql-it "without arguments" (expect (org-ql test-buffer (ts) :action (org-ql-test-org-get-heading)) :to-equal '("Test data" "Take over the universe" "Take over the world" "Skype with president of Antarctica" "Visit Mars" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp"))) - (it ":from a timestamp" + (org-ql-it ":from a timestamp" ;; TODO: Figure out why these take longer than the other (ts) tests. (expect (org-ql test-buffer (ts :from "2017-01-01")