Last change
on this file was
12890,
checked in by westram, 10 years ago
|
- fix #602
- added manual wrapper for GB_delete
|
-
Property svn:executable set to
*
|
File size:
819 bytes
|
Line | |
---|
1 | #!/usr/bin/perl |
---|
2 | # |
---|
3 | # script that tests features documented in ../../../PERL2ARB/DOC.html |
---|
4 | # (to make this test working you need to have LintSubs installed) |
---|
5 | # |
---|
6 | # @@@ TODO from: ../../../PERL2ARB/DOC.html@create_container |
---|
7 | |
---|
8 | use strict; |
---|
9 | use warnings; |
---|
10 | |
---|
11 | BEGIN { |
---|
12 | if (not exists $ENV{'ARBHOME'}) { die "Environment variable \$ARBHOME has to be defined"; } |
---|
13 | my $arbhome = $ENV{'ARBHOME'}; |
---|
14 | push @INC, "$arbhome/lib"; |
---|
15 | push @INC, "$arbhome/PERL_SCRIPTS/lib"; |
---|
16 | 1; |
---|
17 | } |
---|
18 | |
---|
19 | use ARB; |
---|
20 | use tools; |
---|
21 | |
---|
22 | sub main() { |
---|
23 | my $gb_main = ARB::open(":","rw"); |
---|
24 | dieOnError(ARB::begin_transaction($gb_main), 'begin_transaction'); |
---|
25 | |
---|
26 | my $gb_name = ARB::create($gb_main,"name","STRING"); |
---|
27 | dieOnError(ARB::write_string($gb_name,"niels"), 'write_string'); |
---|
28 | ARB::delete($gb_name); |
---|
29 | |
---|
30 | ARB::commit_transaction($gb_main); |
---|
31 | ARB::close($gb_main); |
---|
32 | } |
---|
33 | main(); |
---|
Note: See
TracBrowser
for help on using the repository browser.