# This file is part of Eclat -*- Autotest -*- # Copyright (C) 2012, 2013 Sergey Poznyakoff # # Eclat is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # Eclat is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Eclat. If not, see . AT_SETUP([Timestamp sort]) AT_KEYWORDS([sort sortts]) AT_DATA([input], [ 2012-02-20T16:27:51.000Z tolvte februar 2012, seksten tjuefem femtien 2012-10-14T15:51:00.000Z fjortende oktober 2012, femten femtien 2011-01-22T00:00:00.000Z tjueandre januar 2011, null null 2012-02-20T16:25:34.000Z tjuende februar 2012, seksten tjuefem trettifire 2012-02-22T01:21:22.000Z tjueandre februar 2012, ett tjueen tjueto ]) AT_DATA([prog],[sort(.input.collection,".item.key","t"); dump(.); ]) AT_CHECK([tforlan prog input|trws], [0], [.input.collection.item.key: "2011-01-22T00:00:00.000Z" .input.collection.item.value: "tjueandre januar 2011, null null" .input.collection.item.key: "2012-02-20T16:25:34.000Z" .input.collection.item.value: "tjuende februar 2012, seksten tjuefem trettifire" .input.collection.item.key: "2012-02-20T16:27:51.000Z" .input.collection.item.value: "tolvte februar 2012, seksten tjuefem femtien" .input.collection.item.key: "2012-02-22T01:21:22.000Z" .input.collection.item.value: "tjueandre februar 2012, ett tjueen tjueto" .input.collection.item.key: "2012-10-14T15:51:00.000Z" .input.collection.item.value: "fjortende oktober 2012, femten femtien" ]) AT_CLEANUP