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/040-empire/016-technology-make-identifier.sql
Emmanuel BENOîT b15acadc1b Empire technology views
* Added new research-related constants

* Added set of views and functions to list empires' technologies. This
includes a view which determines the visibility of an in-progress
research's details, and a main list view.
2012-03-01 09:50:20 +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;