core/builtins/compare.cif
author Tom Sutcliffe <thomas.sutcliffe@accenture.com>
Tue, 07 Dec 2010 17:29:09 +0000
changeset 90 ceac7084e2e5
parent 66 2a78c4ff2eab
permissions -rw-r--r--
Implemented RObjectIx-based memoryaccess APIs. Upshot is that objinfo now works again on platforms that define FSHELL_NO_DOBJECTIX_SUPPORT.

# compare.cif
# 
# Copyright (c) 2010 Accenture. All rights reserved.
# This component and the accompanying materials are made available
# under the terms of the "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
# 
# Initial Contributors:
# Accenture - Initial contribution
#

==name compare

==short-description

Compare the contents of a pair of files.

==long-description

Completes with zero (C<KErrNone>) if they are are same, or a positive code if they are different.

==argument filename file_name_1

The name of the first file to compare.

==argument filename file_name_2

The name of the second file to compare.

==option bool v verbose

Display verbose information.

==copyright

Copyright (c) 2006-2010 Accenture. All rights reserved.

==smoke-test

date --timestamp | export -s TIMESTAMP
export Temp compare-test-$TIMESTAMP-
echo "Stuff" > $Temp1
echo "Stuff" > $Temp2
echo "Stuff thats different" > $Temp3

compare $Temp1 $Temp2 || $Error # Should be same
compare $Temp1 $Temp3 && $Error # Should be different

rm $Temp1 $Temp2 $Temp3