This repository has been archived on 2025-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
lwb6/legacyworlds-server-data/db-structure/tests/admin/040-functions/045-empire-research/020-technology-make-identifier.sql
Emmanuel BENOîT c9d8a077bd Moved empire research SQL to separate file
* Empire research & technology SQL code was getting dense, so it was
moved to a separate file.
2012-03-01 11:50:40 +01:00

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;