summaryrefslogtreecommitdiff
path: root/ext/interbase/tests/001.phpt
blob: 79263d6f5ce86c4e4a1ab34967560817cdd19b76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--TEST--
InterBase: create test database
--SKIPIF--
<?php if (!extension_loaded("interbase")) print "skip"; ?>
--POST--
--GET--
--FILE--
<?
/* $Id$ */

	$test_base = "ibase_test.tmp";
	$name = tempnam("","CREATEDB");
	$ftmp = fopen($name,"w");
	if (is_file($test_base))
		fwrite($ftmp,
        	"connect \"$test_base\";
            drop database;\n"
        );
   	fwrite($ftmp,
    	"create database \"$test_base\";
        create table test1 (
   		i integer,
   		c varchar(100)
   	);
   	commit;
   	insert into test1(i, c) values(1,  'test table created with isql');
   	exit;\n"
    );
   	fclose($ftmp);
	exec("isql -i $name 2>&1");
	unlink($name);
?>
--EXPECT--