From e2b56b93e6838583062706d1702564a2f2be77e8 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Fri, 21 Jun 2013 15:31:32 -0400 Subject: [PATCH] Bug 9770: C4::ClassSortRoutine::Dewey sorting #2 This adds a test for C4::ClassSortRoutine::Dewey, with the assumption that the call number "JR DVD 800.1" should sort before "JR DVD 900" Signed-off-by: Jason Etheridge --- t/ClassSortRoutine_Dewey.t | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/t/ClassSortRoutine_Dewey.t b/t/ClassSortRoutine_Dewey.t index 7a4d7f4..38b9f04 100755 --- a/t/ClassSortRoutine_Dewey.t +++ b/t/ClassSortRoutine_Dewey.t @@ -6,7 +6,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; BEGIN { use_ok('C4::ClassSortRoutine::Dewey'); @@ -26,3 +26,7 @@ is($cn_sort,"ABC_123_456000000000000","testing alphanumeric"); $cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key("ab c123","45 6"); is($cn_sort,"AB_C123_45_600000000000000","testing middle whitespace"); + +$cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key("YR DVD 800.1",""); +my $cn_sort2 = C4::ClassSortRoutine::Dewey::get_class_sort_key("YR DVD 900",""); +ok( $cn_sort lt $cn_sort2, "testing prefix plus decimal" ); -- 1.7.2.5