1 | % ---------------------------------------------------------------------- |
---|
2 | % TEST: Octave's Rappture Library Test Functions. |
---|
3 | % |
---|
4 | % [err] = test_put(libHandle,path,value,id,append) |
---|
5 | % |
---|
6 | % |
---|
7 | % ====================================================================== |
---|
8 | % AUTHOR: Derrick Kearney, Purdue University |
---|
9 | % Copyright (c) 2004-2005 Purdue Research Foundation |
---|
10 | % |
---|
11 | % See the file "license.terms" for information on usage and |
---|
12 | % redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
13 | % ====================================================================== |
---|
14 | |
---|
15 | function [err] = test_put(libHandle,path,value,id,append) |
---|
16 | err = 1; |
---|
17 | printf("\n\nTESTING rpLibPut\n"); |
---|
18 | [err] = rpLibPut(libHandle,path,value,id,append); |
---|
19 | if !err |
---|
20 | if id != '' |
---|
21 | pathID = [path,'(',id,')'] |
---|
22 | else |
---|
23 | pathID = path |
---|
24 | end |
---|
25 | [retStr, err] = rpLibGet(libHandle,pathID); |
---|
26 | printf ("retStr = %s\n",retStr); |
---|
27 | if !err |
---|
28 | if (retStr != '') && (retStr == value) |
---|
29 | printf ("rpLibPut Successful\n"); |
---|
30 | else |
---|
31 | printf ("rpLibPut FAILED\n"); |
---|
32 | end |
---|
33 | else |
---|
34 | printf ("rpLibGet returned Error\n"); |
---|
35 | end |
---|
36 | else |
---|
37 | printf("Error within rpLibPut\n"); |
---|
38 | end |
---|
39 | end |
---|