1// ============================================================================= 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3// Copyright (C) 2012 - SCILAB ENTERPRISES - Simon GARESTE 4// 5// This file is distributed under the same license as the Scilab package. 6// ============================================================================= 7// 8// <-- CLI SHELL MODE --> 9msgerr = msprintf(gettext("%s: Wrong number of input argument(s): %d to %d expected.\n"), "h5open", 1, 5); 10assert_checkerror("h5open()",msgerr,77); 11msgerr = msprintf(gettext("%s: Wrong type for input argument #%d: string expected.\n"), "h5open", 1); 12assert_checkerror("h5open(42)",msgerr,999); 13a = h5open(TMPDIR + "/x.sod"); 14assert_checkequal(a.root.Name,"/") 15 ans = 16 T 17h5close(a); 18x = 1:10; 19save(TMPDIR + "/x.sod", "x"); 20b = h5open(TMPDIR + "/x.sod"); 21assert_checkequal(b.root.Datasets,"x"); 22h5close(b); 23a = h5open(TMPDIR + "/y.tst"); 24assert_checkequal(a.root.Name,"/"); 25h5write(a,"Dset_1",[1 2;3 4]); 26h5close(a); 27try 28 h5open(SCI + "/COPYING"); 29 error("h5open should produce an error"); 30catch 31end 32copyfile(SCI+"/COPYING",TMPDIR+"/z.h5"); 33try 34 h5open(TMPDIR+"/z.h5"); 35 error("h5open should produce an error"); 36catch 37end 38