# 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([String sort])
AT_KEYWORDS([sort sortstring])
AT_DATA([input],
[
7syv3tre10ti6seks1en
])
AT_DATA([prog],[sort(.input.collection,".item.key");
dump(.);
])
AT_CHECK([tforlan prog input|trws],
[0],
[.input.collection.item.key: "1"
.input.collection.item.value: "en"
.input.collection.item.key: "10"
.input.collection.item.value: "ti"
.input.collection.item.key: "3"
.input.collection.item.value: "tre"
.input.collection.item.key: "6"
.input.collection.item.value: "seks"
.input.collection.item.key: "7"
.input.collection.item.value: "syv"
])
AT_CLEANUP