[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-real 96452e21da 124/188: Added smoke test; fixed be
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-real 96452e21da 124/188: Added smoke test; fixed behind preposition |
Date: |
Sun, 5 May 2024 22:56:01 -0400 (EDT) |
branch: externals/org-real
commit 96452e21da218123ff37bf192778c30c081ad670
Author: Amy Grinn <grinn.amy@gmail.com>
Commit: Amy Grinn <grinn.amy@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 c08f2b9c3b..2073472f1f 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 0000000000..f5ad46ea74
--- /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 5b072b22fc 059/188: Requirements before patches, (continued)
- [elpa] externals/org-real 5b072b22fc 059/188: Requirements before patches, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 1cdf75a535 061/188: More edge cases, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 5aa1d48508 072/188: Updated documentation, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 498121ff24 082/188: Satisfying elc compiler, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real dde9cd1475 085/188: Updated readme, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real f4f131351a 094/188: Added expansion slots to speed up initial rendering, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 33870b4875 084/188: Passing edge cases, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 851a987c22 095/188: Typo in flex-adjust, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 2eeb98c996 099/188: More edge cases, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real f7b73e0f6d 105/188: Navigate by relationship; color currenly selected box and rel-box, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 96452e21da 124/188: Added smoke test; fixed behind preposition,
ELPA Syncer <=
- [elpa] externals/org-real 865b289b71 123/188: Only flex adjusting necessary boxes, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 4dd03477f0 026/188: Bump version, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 1cd88e6bae 047/188: Added customization group, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real eaa68cd701 036/188: Renamed md5 command, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 4d27ba59b9 062/188: Updated readme, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real c82d557eb4 066/188: v0.2.0, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 3b123018dd 078/188: Reuse window if org real diagram already visible, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real f24300e466 077/188: Complete redesign, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 199a3d2618 091/188: Auto-fill description when inserting link, ELPA Syncer, 2024/05/05
- [elpa] externals/org-real 5164b5eb0a 081/188: Org real headlines switched to add-next, ELPA Syncer, 2024/05/05