Skip to content

Commit c68e306

Browse files
committed
test: verify trace macro output with file-path-print-length short
1 parent 575e2f4 commit c68e306

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

scripts/run_carp_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ printf '%s\n' \
103103
./test/produces-output/forward_references.carp \
104104
./test/produces-output/explicit_lifetimes.carp \
105105
./test/produces-output/repl.carp \
106+
./test/produces-output/trace_assert_check.carp \
106107
| xargs -n1 -P"$JOBS" -I{} sh -c './test/execute.sh "$1"' _ {}
107108

108109
echo "Actual tests (using the test suite)"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
trace_assert_check.carp:3:24: (+ 10 20) = 30
2+
trace_assert_check.carp:4:25: (copy "hello") = @"hello"
3+
All test assertions passed successfully!
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(Project.config "file-path-print-length" "short")
2+
(defn main []
3+
(let [x (Debug.trace (+ 10 20))
4+
y (Debug.trace @"hello")]
5+
(do
6+
(assert (= x 30))
7+
(assert (= x 30) "x must be 30")
8+
(IO.println "All test assertions passed successfully!")
9+
())))

0 commit comments

Comments
 (0)