source: branches/profile/PERL_SCRIPTS/ARBTOOLS/TESTS/manual.pl

Last change on this file was 12890, checked in by westram, 5 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
8use strict;
9use warnings;
10
11BEGIN {
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
19use ARB;
20use tools;
21
22sub 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}
33main();
Note: See TracBrowser for help on using the repository browser.