710 |
(result (substitute-if-not 1 #'onep x :from-end t :count 1))) |
(result (substitute-if-not 1 #'onep x :from-end t :count 1))) |
711 |
result) |
result) |
712 |
#*01111) |
#*01111) |
713 |
|
|
714 |
|
;;; Error cases |
715 |
|
|
716 |
|
(deftest substitute-if-not.error.1 |
717 |
|
(classify-error (substitute-if-not)) |
718 |
|
program-error) |
719 |
|
|
720 |
|
(deftest substitute-if-not.error.2 |
721 |
|
(classify-error (substitute-if-not 'a)) |
722 |
|
program-error) |
723 |
|
|
724 |
|
(deftest substitute-if-not.error.3 |
725 |
|
(classify-error (substitute-if-not 'a #'null)) |
726 |
|
program-error) |
727 |
|
|
728 |
|
(deftest substitute-if-not.error.4 |
729 |
|
(classify-error (substitute-if-not 'a #'null nil 'bad t)) |
730 |
|
program-error) |
731 |
|
|
732 |
|
(deftest substitute-if-not.error.5 |
733 |
|
(classify-error (substitute-if-not 'a #'null nil |
734 |
|
'bad t :allow-other-keys nil)) |
735 |
|
program-error) |
736 |
|
|
737 |
|
(deftest substitute-if-not.error.6 |
738 |
|
(classify-error (substitute-if-not 'a #'null nil :key)) |
739 |
|
program-error) |
740 |
|
|
741 |
|
(deftest substitute-if-not.error.7 |
742 |
|
(classify-error (substitute-if-not 'a #'null nil 1 2)) |
743 |
|
program-error) |