diff --git a/test-suite/tests/sort.test b/test-suite/tests/sort.test index af4578ca0..a49c04857 100644 --- a/test-suite/tests/sort.test +++ b/test-suite/tests/sort.test @@ -1,5 +1,5 @@ ;;;; sort.test --- tests Guile's sort functions -*- scheme -*- -;;;; Copyright (C) 2003, 2006 Free Software Foundation, Inc. +;;;; Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -63,3 +63,16 @@ (v (make-shared-array a (lambda (i) (list (- 999 i) 0)) 1000))) (randomize-vector! v 1000) (sorted? (stable-sort! v <) <)))) + + +;;; +;;; stable-sort +;;; + +(with-test-prefix "stable-sort" + + ;; in guile 1.8.0 and 1.8.1 this test failed, an empty list provoked a + ;; wrong-type-arg exception (where it shouldn't) + (pass-if "empty list" + (eq? '() (stable-sort '() <)))) +