ObjPgSQL  Check-in [4c1432632b]

Overview
Comment:tests: Get username from environment
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4c1432632b30cbe6e876af1b803dfbe826166cd9d5bfd4d15043c67bcd9a59de
User & Date: js on 2014-07-18 23:35:22
Other Links: manifest | tags
Context
2015-09-06
16:17
Adjust to ObjFW changes check-in: 8af0a7a766 user: js tags: trunk
2014-07-18
23:35
tests: Get username from environment check-in: 4c1432632b user: js tags: trunk
23:35
Add a proper build system check-in: 8679c61b2c user: js tags: trunk
Changes

Modified tests/tests.m from [f75f44e51e] to [28c8c03b77].

10
11
12
13
14
15
16


17
18
19
20
21
22

23
24
25
26
27
28
29
@end

OF_APPLICATION_DELEGATE(Test)

@implementation Test
- (void)applicationDidFinishLaunching
{


	PGResult *result;

	connection = [[PGConnection alloc] init];
	[connection setParameters:
	    [OFDictionary dictionaryWithKeysAndObjects: @"user", @"js",
							@"dbname", @"js", nil]];

	[connection connect];

	[connection executeCommand: @"DROP TABLE IF EXISTS test"];
	[connection executeCommand: @"CREATE TABLE test ("
				    @"    id integer,"
				    @"    name varchar(255),"
				    @"    content text,"







>
>




|
|
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@end

OF_APPLICATION_DELEGATE(Test)

@implementation Test
- (void)applicationDidFinishLaunching
{
	OFString *username =
	    [[OFApplication environment] objectForKey: @"USER"];
	PGResult *result;

	connection = [[PGConnection alloc] init];
	[connection setParameters:
	    [OFDictionary dictionaryWithKeysAndObjects: @"user", username,
							@"dbname", username,
							nil]];
	[connection connect];

	[connection executeCommand: @"DROP TABLE IF EXISTS test"];
	[connection executeCommand: @"CREATE TABLE test ("
				    @"    id integer,"
				    @"    name varchar(255),"
				    @"    content text,"