#!/bin/ksh #************************************************************** # Author: Patrick Brockmann # Contact: Patrick.Brockmann@cea.fr # $Date$ # $Author$ # $Revision$ # IPSL (2006) # This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC # History: # Modification: # #************************************************************** # This script is used to generate a reference file with command : # IGCM_card_Test.ksh > IGCM_card_Test.ref 2>&1 # The reference file produced is used by the function IGCM_card_Check # to verify that the libIGCM_card produce the same results #================================================= libIGCM=`dirname $0`/.. . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh . ${libIGCM}/libIGCM_card/libIGCM_card.ksh #================================================= cat ${libIGCM}/libIGCM_card/TestFile.card #================================================= # function IGCM_card_PrintOption IGCM_card_PrintOption ${libIGCM}/libIGCM_card/TestFile.card Messages Option1 IGCM_card_PrintOption ${libIGCM}/libIGCM_card/TestFile.card Messages Option2 IGCM_card_PrintOption ${libIGCM}/libIGCM_card/TestFile.card ColorValues Red IGCM_card_PrintOption ${libIGCM}/libIGCM_card/TestFile.card ColorValues Blue IGCM_card_PrintOption ${libIGCM}/libIGCM_card/TestFile.card ColorValues Green #================================================= # function IGCM_card_PrintSection IGCM_card_PrintSection ${libIGCM}/libIGCM_card/TestFile.card Recipes IGCM_card_PrintSection ${libIGCM}/libIGCM_card/TestFile.card Couples #================================================== # function IGCM_card_DefineVariableFromOption IGCM_card_DefineVariableFromOption ${libIGCM}/libIGCM_card/TestFile.card Messages Option2 echo ${TestFile_Messages_Option2} IGCM_card_DefineVariableFromOption ${libIGCM}/libIGCM_card/TestFile.card ColorValues Red echo ${TestFile_ColorValues_Red} #================================================== # function IGCM_card_DefineArrayFromOption IGCM_card_DefineArrayFromOption ${libIGCM}/libIGCM_card/TestFile.card Couples List1 echo ${TestFile_Couples_List1[*]} IGCM_card_DefineArrayFromOption ${libIGCM}/libIGCM_card/TestFile.card Couples List2 echo ${TestFile_Couples_List2[*]} #================================================= # function IGCM_card_DefineArrayFromSection IGCM_card_DefineArrayFromSection ${libIGCM}/libIGCM_card/TestFile.card ColorValues echo ${TestFile_ColorValues[*]} #================================================== # function IGCM_card_WriteOption #------------------------- cp ${libIGCM}/libIGCM_card/TestFile.card NewTestFile.card IGCM_card_WriteOption NewTestFile.card Messages Option2 '"Hello Mercure"' IGCM_card_WriteOption NewTestFile.card Messages ListVal1 '( 1, 2, 3 )' listname="(Sebastien, Martial, Patrick)" IGCM_card_WriteOption NewTestFile.card Messages ListVal2 "${listname}" set -A tableau one, two, three, four echo ${tableau[*]} IGCM_card_WriteOption NewTestFile.card Messages ListVal3 "( ${tableau[*]} )" IGCM_card_WriteOption NewTestFile.card ColorValues Red 888 diff ${libIGCM}/libIGCM_card/TestFile.card NewTestFile.card rm -f NewTestFile.card