Emmanuel BENOîT
c9d8a077bd
* Empire research & technology SQL code was getting dense, so it was moved to a separate file.
17 lines
No EOL
729 B
PL/PgSQL
17 lines
No EOL
729 B
PL/PgSQL
/*
|
|
* Unit tests for emp.technology_make_identifier()
|
|
*/
|
|
BEGIN;
|
|
SELECT no_plan( );
|
|
|
|
SELECT diag_test_name( 'emp.technology_make_identifier() - Identifier of visible technologies' );
|
|
SELECT is( emp.technology_make_identifier( 1 , 'test-string' , TRUE ) , 'test-string' );
|
|
|
|
SELECT diag_test_name( 'emp.technology_make_identifier() - Identifier of unknown technologies - 32 characters' );
|
|
SELECT is( length( emp.technology_make_identifier( 1 , 'test-string' , FALSE ) ) , 32 );
|
|
|
|
SELECT diag_test_name( 'emp.technology_make_identifier() - Identifier of unknown technologies - Contains hex value' );
|
|
SELECT ok( emp.technology_make_identifier( 1 , 'test-string' , FALSE ) !~ '[^a-f0-9]' );
|
|
|
|
SELECT * FROM finish( );
|
|
ROLLBACK; |