|
478 | 478 | (is (str/includes? (-> (session/message {:op "eval"
|
479 | 479 | :inspect "true"
|
480 | 480 | :code fits})
|
481 |
| - extract-text) |
482 |
| - (x-pattern (- max-len 10) ""))) |
| 481 | + extract-text) |
| 482 | + (x-pattern (- max-len 10) ""))) |
483 | 483 | (is (str/includes? (-> (session/message {:op "eval"
|
484 | 484 | :inspect "true"
|
485 | 485 | :code too-long})
|
486 |
| - extract-text) |
487 |
| - (x-pattern max-len "..."))) |
| 486 | + extract-text) |
| 487 | + (x-pattern max-len "..."))) |
488 | 488 | (is (str/includes? (-> (session/message {:op "eval"
|
489 | 489 | :inspect "true"
|
490 | 490 | :code too-long
|
491 | 491 | :max-atom-length 10})
|
492 |
| - extract-text) |
493 |
| - (x-pattern 10 "...")))) |
| 492 | + extract-text) |
| 493 | + (x-pattern 10 "...")))) |
494 | 494 |
|
495 | 495 | (testing "max atom length can be changed without re-eval'ing last form"
|
496 | 496 | (session/message {:op "inspect-clear"})
|
497 | 497 | (is (str/includes? (-> (session/message {:op "eval"
|
498 | 498 | :inspect "true"
|
499 | 499 | :code too-long})
|
500 |
| - extract-text) |
501 |
| - (x-pattern max-len "..."))) |
| 500 | + extract-text) |
| 501 | + (x-pattern max-len "..."))) |
502 | 502 | (is (str/includes? (-> (session/message {:op "inspect-refresh"
|
503 | 503 | :max-atom-length 10})
|
504 |
| - extract-text) |
505 |
| - (x-pattern 10 "..."))) |
| 504 | + extract-text) |
| 505 | + (x-pattern 10 "..."))) |
506 | 506 | (is (str/includes? (-> (session/message {:op "inspect-refresh"
|
507 | 507 | :max-atom-length 20})
|
508 |
| - extract-text) |
509 |
| - (x-pattern 20 "...")))))) |
| 508 | + extract-text) |
| 509 | + (x-pattern 20 "...")))))) |
510 | 510 |
|
511 | 511 | (deftest max-value-length-integration-test
|
512 | 512 | (let [max-len (:max-value-length @#'orchard.inspect/default-inspector-config)
|
|
592 | 592 | :code nested-coll
|
593 | 593 | :max-nested-depth 5})]
|
594 | 594 | (is (str/includes? (extract-text default)
|
595 |
| - "\"[[[[[[[[[[1]]]]]]]]]]\"")) |
| 595 | + "\"[[[[[[[[[[1]]]]]]]]]]\"")) |
596 | 596 | (is (str/includes? (extract-text limited)
|
597 |
| - "\"[[[[[[...]]]]]]\"")))) |
| 597 | + "\"[[[[[[...]]]]]]\"")))) |
598 | 598 |
|
599 | 599 | (testing "max nested depth can be changed without re-eval'ing last form"
|
600 | 600 | (session/message {:op "inspect-clear"})
|
|
604 | 604 | limited (session/message {:op "inspect-refresh"
|
605 | 605 | :max-nested-depth 5})]
|
606 | 606 | (is (str/includes? (extract-text default)
|
607 |
| - "\"[[[[[[[[[[1]]]]]]]]]]\"")) |
| 607 | + "\"[[[[[[[[[[1]]]]]]]]]]\"")) |
608 | 608 | (is (str/includes? (extract-text limited)
|
609 |
| - "\"[[[[[[...]]]]]]\"")))))) |
| 609 | + "\"[[[[[[...]]]]]]\"")))))) |
610 | 610 |
|
611 | 611 | (def normal-mode-prefix
|
612 | 612 | ["--- Contents:" [:newline]
|
|
0 commit comments