[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-real add82f3 124/160: Added smoke test; fixed behin
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-real add82f3 124/160: Added smoke test; fixed behind preposition |
Date: |
Wed, 6 Oct 2021 16:58:30 -0400 (EDT) |
branch: externals/org-real
commit add82f374b45c9c1dc82bd3984eaa0d1029b9890
Author: Tyler Grinn <tylergrinn@gmail.com>
Commit: Tyler Grinn <tylergrinn@gmail.com>
Added smoke test; fixed behind preposition
---
org-real.el | 41 +++++++++-----
tests/smoke-test.org | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 175 insertions(+), 13 deletions(-)
diff --git a/org-real.el b/org-real.el
index c08f2b9..2073472 100644
--- a/org-real.el
+++ b/org-real.el
@@ -944,23 +944,37 @@ button drawn."
(current-column))))
(delete-char (min (length str)
remaining-chars)))))))
(draw (cons top left)
- (concat (if double "╔" "┌")
- (make-string (- width 2) (cond (dashed #x254c)
+ (concat (cond ((and double dashed) "┏")
+ (double "╔")
+ (t "┌"))
+ (make-string (- width 2) (cond ((and double dashed)
#x2505)
+ (dashed #x254c)
(double #x2550)
(t #x2500)))
- (if double "╗" "┐")))
+ (cond ((and double dashed) "┓")
+ (double "╗")
+ (t "┐"))))
(if align-bottom
(draw (cons (+ top height) left)
- (concat (if double "╨" "┴")
+ (concat (cond ((and double dashed) "┸")
+ (double "╨")
+ (t "┴"))
(make-string (- width 2) (cond (dashed #x254c)
(t #x2500)))
- (if double "╨" "┴")))
+ (cond ((and double dashed) "┸")
+ (double "╨")
+ (t "┴"))))
(draw (cons (+ top height -1) left)
- (concat (if double "╚" "└")
- (make-string (- width 2) (cond (dashed #x254c)
+ (concat (cond ((and double dashed) "┗")
+ (double "╚")
+ (t "└"))
+ (make-string (- width 2) (cond ((and double
dashed) #x2505)
+ (dashed #x254c)
(double #x2550)
(t #x2500)))
- (if double "╝" "┘"))))
+ (cond ((and double dashed) "┛")
+ (double "╝")
+ (t "┘")))))
(draw-name (cons (+ top 1 org-real-padding-y)
(+ left 1 org-real-padding-x))
name
@@ -969,10 +983,12 @@ button drawn."
(c1 left)
(c2 (+ left width -1)))
(dotimes (_ (- height (if align-bottom 1 2)))
- (draw (cons r c1) (cond (dashed "╎")
+ (draw (cons r c1) (cond ((and double dashed) "┇")
+ (dashed "╎")
(double "║")
(t "│")))
- (draw (cons r c2) (cond (dashed "╎")
+ (draw (cons r c2) (cond ((and double dashed) "┇")
+ (dashed "╎")
(double "║")
(t "│")))
(setq r (+ r 1))))))))
@@ -1547,8 +1563,9 @@ NEXT."
((or next-on-top next-in-front)
(setq next-level (+ 1 prev-level))
(setq next-behind prev-behind))
- ((member rel '("in" "on" "behind"))
+ ((member rel '("in" "on"))
(setq flex t)
+ (setq next-behind prev-behind)
(setq next-level (+ 1 prev-level)))
((string= rel "behind")
(setq flex t)
@@ -1652,8 +1669,6 @@ characters if possible."
max)))))
all-siblings
(org-real-box :y-order -1.0e+INF)))))
- (oset box :flex t)
- (oset box :behind parent-behind)
(org-real--apply-level box level)
(org-real--add-child parent box t)
(org-real--flex-adjust box world)
diff --git a/tests/smoke-test.org b/tests/smoke-test.org
new file mode 100644
index 0000000..f5ad46e
--- /dev/null
+++ b/tests/smoke-test.org
@@ -0,0 +1,147 @@
+#+TODO: FAIL | PASS
+
+* Opening links
+
+** PASS [[real://1-2/1-1][in]]
+ #+begin_example
+
+ The 1-1 is in the 1-2.
+
+ ┌─────────────┐
+ │ │
+ │ 1-2 │
+ │ │
+ │ ┌───────┐ │
+ │ │ │ │
+ │ │ 1-1 │ │
+ │ │ │ │
+ │ └───────┘ │
+ └─────────────┘
+ #+end_example
+
+** PASS [[real://2-2/2-1?rel=on][on]]
+ #+begin_example
+
+ The 2-1 is on the 2-2.
+
+ ┌─────────────┐
+ │ │
+ │ 2-2 │
+ │ │
+ │ ┌───────┐ │
+ │ │ │ │
+ │ │ 2-1 │ │
+ │ │ │ │
+ │ └───────┘ │
+ └─────────────┘
+ #+end_example
+
+** PASS [[real://3-2/3-1?rel=behind][behind]]
+ #+begin_example
+
+ The 3-1 is behind the 3-2.
+
+ ┌─────────────┐
+ │ │
+ │ 3-2 │
+ │ │
+ │ ┌╌╌╌╌╌╌╌┐ │
+ │ ╎ ╎ │
+ │ ╎ 3-1 ╎ │
+ │ ╎ ╎ │
+ │ └╌╌╌╌╌╌╌┘ │
+ └─────────────┘
+ #+end_example
+
+** PASS [[real://4-2/4-1?rel=in front of][in front of]]
+ #+begin_example
+
+ The 4-1 is in front of the 4-2.
+
+ ┌─────────────┐
+ │ │
+ │ 4-2 │
+ │ │
+ │ ┌───────┐ │
+ │ │ │ │
+ │ │ 4-1 │ │
+ │ │ │ │
+ └──┴───────┴──┘
+ #+end_example
+
+** PASS [[real://5-2/5-1?rel=above][above]]
+ #+begin_example
+
+ The 5-1 is above the 5-2.
+
+ ┌───────┐
+ │ │
+ │ 5-1 │
+ │ │
+ └───────┘
+
+ ┌───────┐
+ │ │
+ │ 5-2 │
+ │ │
+ └───────┘
+ #+end_example
+
+** PASS [[real://6-2/6-1?rel=below][below]]
+ #+begin_example
+
+ The 6-1 is below the 6-2.
+
+ ┌───────┐
+ │ │
+ │ 6-2 │
+ │ │
+ └───────┘
+
+ ┌───────┐
+ │ │
+ │ 6-1 │
+ │ │
+ └───────┘
+ #+end_example
+
+
+** PASS [[real://7-2/7-1?rel=to the left of][left]]
+ #+begin_example
+
+ The 7-1 is to the left of the 7-2.
+
+ ┌───────┐ ┌───────┐
+ │ │ │ │
+ │ 7-1 │ │ 7-2 │
+ │ │ │ │
+ └───────┘ └───────┘
+ #+end_example
+
+** PASS [[real://8-2/8-1?rel=to the right of][right]]
+ #+begin_example
+
+ The 8-1 is to the right of the 8-2.
+
+ ┌───────┐ ┌───────┐
+ │ │ │ │
+ │ 8-2 │ │ 8-1 │
+ │ │ │ │
+ └───────┘ └───────┘
+ #+end_example
+
+** PASS [[real://9-2/9-1?rel=on top of][on top]]
+ #+begin_example
+
+ The 9-1 is on top of the 9-2.
+
+ ┌───────┐
+ │ │
+ │ 9-1 │
+ │ │
+ ┌──┴───────┴──┐
+ │ │
+ │ 9-2 │
+ │ │
+ └─────────────┘
+ #+end_example
- [elpa] externals/org-real 7767388 114/160: Removed popup.el dependency, (continued)
- [elpa] externals/org-real 7767388 114/160: Removed popup.el dependency, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 0e8bd16 104/160: Relationship defaults to "in" if omitted in link, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 4a60feb 109/160: Linting, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 72dd6bf 113/160: Added more customization vars, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real bf8a26c 105/160: Navigate by relationship; color currenly selected box and rel-box, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real d9aab4e 103/160: Refactoring, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real b3d1c09 115/160: Redesigned tooltips, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real d23f9bf 112/160: If headline is a link, only display description, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real f883078 101/160: Merge branch 'next' into 'main', ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 9707641 130/160: Allow boxes to not have location markers, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real add82f3 124/160: Added smoke test; fixed behind preposition,
ELPA Syncer <=
- [elpa] externals/org-real 6428a6d 125/160: Smooth lines, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real e38ae9b 131/160: Added help-echo slot for minibuffer messages, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 5f5f352 117/160: Jump to location when entering org real mode, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real ce817a1 139/160: Merge display-rel-box, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 75871b1 140/160: Color theme update, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 5541420 143/160: Use buffer name instead of buffer-file-name for org-real-headlines, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real cd43923 119/160: Use original relationship for tooltip if changed, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real f03777b 132/160: Fixed hiding of rel-box border, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 8d5af75 144/160: Linting, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real ab46371 160/160: Merge branch 'next' into 'main', ELPA Syncer, 2021/10/06