632 |
(result (nsubstitute-if-not 1 #'onep x :from-end t :count 1))) |
(result (nsubstitute-if-not 1 #'onep x :from-end t :count 1))) |
633 |
result) |
result) |
634 |
#*01111) |
#*01111) |
635 |
|
|
636 |
|
;;; Error cases |
637 |
|
|
638 |
|
(deftest nsubstitute-if-not.error.1 |
639 |
|
(classify-error (nsubstitute-if-not)) |
640 |
|
program-error) |
641 |
|
|
642 |
|
(deftest nsubstitute-if-not.error.2 |
643 |
|
(classify-error (nsubstitute-if-not 'a)) |
644 |
|
program-error) |
645 |
|
|
646 |
|
(deftest nsubstitute-if-not.error.3 |
647 |
|
(classify-error (nsubstitute-if-not 'a #'null)) |
648 |
|
program-error) |
649 |
|
|
650 |
|
(deftest nsubstitute-if-not.error.4 |
651 |
|
(classify-error (nsubstitute-if-not 'a #'null nil 'bad t)) |
652 |
|
program-error) |
653 |
|
|
654 |
|
(deftest nsubstitute-if-not.error.5 |
655 |
|
(classify-error (nsubstitute-if-not 'a #'null nil |
656 |
|
'bad t :allow-other-keys nil)) |
657 |
|
program-error) |
658 |
|
|
659 |
|
(deftest nsubstitute-if-not.error.6 |
660 |
|
(classify-error (nsubstitute-if-not 'a #'null nil :key)) |
661 |
|
program-error) |
662 |
|
|
663 |
|
(deftest nsubstitute-if-not.error.7 |
664 |
|
(classify-error (nsubstitute-if-not 'a #'null nil 1 2)) |
665 |
|
program-error) |
666 |
|
|