mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-23 14:03:06 +01:00
378 lines
10 KiB
Python
378 lines
10 KiB
Python
#coding:utf-8
|
|
#
|
|
# id: functional.basic.isql.02
|
|
# title: ISQL - SHOW SYSTEM TABLES
|
|
# decription:
|
|
# Check for correct output of "SHOW SYSTEM;" command on empty database.
|
|
# Checked on:
|
|
# 2.5.9.27126: OK, 0.484s.
|
|
# 3.0.5.33086: OK, 1.031s.
|
|
# 4.0.0.1378: OK, 7.547s.
|
|
#
|
|
# tracker_id:
|
|
# min_versions: []
|
|
# versions: 3.0, 4.0
|
|
# qmid: functional.basic.isql.isql_02
|
|
|
|
import pytest
|
|
from firebird.qa import db_factory, isql_act, Action
|
|
|
|
# version: 3.0
|
|
# resources: None
|
|
|
|
substitutions_1 = []
|
|
|
|
init_script_1 = """"""
|
|
|
|
db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
|
|
|
test_script_1 = """show system ;"""
|
|
|
|
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
|
|
|
expected_stdout_1 = """
|
|
Tables:
|
|
MON$ATTACHMENTS MON$CALL_STACK
|
|
MON$CONTEXT_VARIABLES MON$DATABASE
|
|
MON$IO_STATS MON$MEMORY_USAGE
|
|
MON$RECORD_STATS MON$STATEMENTS
|
|
MON$TABLE_STATS MON$TRANSACTIONS
|
|
RDB$AUTH_MAPPING RDB$BACKUP_HISTORY
|
|
RDB$CHARACTER_SETS RDB$CHECK_CONSTRAINTS
|
|
RDB$COLLATIONS RDB$DATABASE
|
|
RDB$DB_CREATORS RDB$DEPENDENCIES
|
|
RDB$EXCEPTIONS RDB$FIELDS
|
|
RDB$FIELD_DIMENSIONS RDB$FILES
|
|
RDB$FILTERS RDB$FORMATS
|
|
RDB$FUNCTIONS RDB$FUNCTION_ARGUMENTS
|
|
RDB$GENERATORS RDB$INDEX_SEGMENTS
|
|
RDB$INDICES RDB$LOG_FILES
|
|
RDB$PACKAGES RDB$PAGES
|
|
RDB$PROCEDURES RDB$PROCEDURE_PARAMETERS
|
|
RDB$REF_CONSTRAINTS RDB$RELATIONS
|
|
RDB$RELATION_CONSTRAINTS RDB$RELATION_FIELDS
|
|
RDB$ROLES RDB$SECURITY_CLASSES
|
|
RDB$TRANSACTIONS RDB$TRIGGERS
|
|
RDB$TRIGGER_MESSAGES RDB$TYPES
|
|
RDB$USER_PRIVILEGES RDB$VIEW_RELATIONS
|
|
SEC$DB_CREATORS SEC$GLOBAL_AUTH_MAPPING
|
|
SEC$USERS SEC$USER_ATTRIBUTES
|
|
|
|
Collations:
|
|
ASCII BIG_5
|
|
BS_BA CP943C
|
|
CP943C_UNICODE CS_CZ
|
|
CYRL DA_DA
|
|
DB_CSY DB_DAN865
|
|
DB_DEU437 DB_DEU850
|
|
DB_ESP437 DB_ESP850
|
|
DB_FIN437 DB_FRA437
|
|
DB_FRA850 DB_FRC850
|
|
DB_FRC863 DB_ITA437
|
|
DB_ITA850 DB_NLD437
|
|
DB_NLD850 DB_NOR865
|
|
DB_PLK DB_PTB850
|
|
DB_PTG860 DB_RUS
|
|
DB_SLO DB_SVE437
|
|
DB_SVE850 DB_TRK
|
|
DB_UK437 DB_UK850
|
|
DB_US437 DB_US850
|
|
DE_DE DOS437
|
|
DOS737 DOS775
|
|
DOS850 DOS852
|
|
DOS857 DOS858
|
|
DOS860 DOS861
|
|
DOS862 DOS863
|
|
DOS864 DOS865
|
|
DOS866 DOS869
|
|
DU_NL EN_UK
|
|
EN_US ES_ES
|
|
ES_ES_CI_AI EUCJ_0208
|
|
FI_FI FR_CA
|
|
FR_CA_CI_AI FR_FR
|
|
FR_FR_CI_AI GB18030
|
|
GB18030_UNICODE GBK
|
|
GBK_UNICODE GB_2312
|
|
ISO8859_1 ISO8859_13
|
|
ISO8859_2 ISO8859_3
|
|
ISO8859_4 ISO8859_5
|
|
ISO8859_6 ISO8859_7
|
|
ISO8859_8 ISO8859_9
|
|
ISO_HUN ISO_PLK
|
|
IS_IS IT_IT
|
|
KOI8R KOI8R_RU
|
|
KOI8U KOI8U_UA
|
|
KSC_5601 KSC_DICTIONARY
|
|
LT_LT NEXT
|
|
NONE NO_NO
|
|
NXT_DEU NXT_ESP
|
|
NXT_FRA NXT_ITA
|
|
NXT_US OCTETS
|
|
PDOX_ASCII PDOX_CSY
|
|
PDOX_CYRL PDOX_HUN
|
|
PDOX_INTL PDOX_ISL
|
|
PDOX_NORDAN4 PDOX_PLK
|
|
PDOX_SLO PDOX_SWEDFIN
|
|
PT_BR PT_PT
|
|
PXW_CSY PXW_CYRL
|
|
PXW_GREEK PXW_HUN
|
|
PXW_HUNDC PXW_INTL
|
|
PXW_INTL850 PXW_NORDAN4
|
|
PXW_PLK PXW_SLOV
|
|
PXW_SPAN PXW_SWEDFIN
|
|
PXW_TURK SJIS_0208
|
|
SV_SV TIS620
|
|
TIS620_UNICODE UCS_BASIC
|
|
UNICODE UNICODE_CI
|
|
UNICODE_CI_AI UNICODE_FSS
|
|
UTF8 WIN1250
|
|
WIN1251 WIN1251_UA
|
|
WIN1252 WIN1253
|
|
WIN1254 WIN1255
|
|
WIN1256 WIN1257
|
|
WIN1257_EE WIN1257_LT
|
|
WIN1257_LV WIN1258
|
|
WIN_CZ WIN_CZ_CI_AI
|
|
WIN_PTBR
|
|
"""
|
|
|
|
@pytest.mark.version('>=3.0,<4.0')
|
|
def test_1(act_1: Action):
|
|
act_1.expected_stdout = expected_stdout_1
|
|
act_1.execute()
|
|
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
|
|
|
# version: 4.0
|
|
# resources: None
|
|
|
|
substitutions_2 = []
|
|
|
|
init_script_2 = """"""
|
|
|
|
db_2 = db_factory(sql_dialect=3, init=init_script_2)
|
|
|
|
test_script_2 = """
|
|
show system;
|
|
"""
|
|
|
|
act_2 = isql_act('db_2', test_script_2, substitutions=substitutions_2)
|
|
|
|
expected_stdout_2 = """
|
|
Tables:
|
|
MON$ATTACHMENTS
|
|
MON$CALL_STACK
|
|
MON$CONTEXT_VARIABLES
|
|
MON$DATABASE
|
|
MON$IO_STATS
|
|
MON$MEMORY_USAGE
|
|
MON$RECORD_STATS
|
|
MON$STATEMENTS
|
|
MON$TABLE_STATS
|
|
MON$TRANSACTIONS
|
|
RDB$AUTH_MAPPING
|
|
RDB$BACKUP_HISTORY
|
|
RDB$CHARACTER_SETS
|
|
RDB$CHECK_CONSTRAINTS
|
|
RDB$COLLATIONS
|
|
RDB$CONFIG
|
|
RDB$DATABASE
|
|
RDB$DB_CREATORS
|
|
RDB$DEPENDENCIES
|
|
RDB$EXCEPTIONS
|
|
RDB$FIELDS
|
|
RDB$FIELD_DIMENSIONS
|
|
RDB$FILES
|
|
RDB$FILTERS
|
|
RDB$FORMATS
|
|
RDB$FUNCTIONS
|
|
RDB$FUNCTION_ARGUMENTS
|
|
RDB$GENERATORS
|
|
RDB$INDEX_SEGMENTS
|
|
RDB$INDICES
|
|
RDB$LOG_FILES
|
|
RDB$PACKAGES
|
|
RDB$PAGES
|
|
RDB$PROCEDURES
|
|
RDB$PROCEDURE_PARAMETERS
|
|
RDB$PUBLICATIONS
|
|
RDB$PUBLICATION_TABLES
|
|
RDB$REF_CONSTRAINTS
|
|
RDB$RELATIONS
|
|
RDB$RELATION_CONSTRAINTS
|
|
RDB$RELATION_FIELDS
|
|
RDB$ROLES
|
|
RDB$SECURITY_CLASSES
|
|
RDB$TIME_ZONES
|
|
RDB$TRANSACTIONS
|
|
RDB$TRIGGERS
|
|
RDB$TRIGGER_MESSAGES
|
|
RDB$TYPES
|
|
RDB$USER_PRIVILEGES
|
|
RDB$VIEW_RELATIONS
|
|
SEC$DB_CREATORS
|
|
SEC$GLOBAL_AUTH_MAPPING
|
|
SEC$USERS
|
|
SEC$USER_ATTRIBUTES
|
|
|
|
Collations:
|
|
ASCII
|
|
BIG_5
|
|
BS_BA
|
|
CP943C
|
|
CP943C_UNICODE
|
|
CS_CZ
|
|
CYRL
|
|
DA_DA
|
|
DB_CSY
|
|
DB_DAN865
|
|
DB_DEU437
|
|
DB_DEU850
|
|
DB_ESP437
|
|
DB_ESP850
|
|
DB_FIN437
|
|
DB_FRA437
|
|
DB_FRA850
|
|
DB_FRC850
|
|
DB_FRC863
|
|
DB_ITA437
|
|
DB_ITA850
|
|
DB_NLD437
|
|
DB_NLD850
|
|
DB_NOR865
|
|
DB_PLK
|
|
DB_PTB850
|
|
DB_PTG860
|
|
DB_RUS
|
|
DB_SLO
|
|
DB_SVE437
|
|
DB_SVE850
|
|
DB_TRK
|
|
DB_UK437
|
|
DB_UK850
|
|
DB_US437
|
|
DB_US850
|
|
DE_DE
|
|
DOS437
|
|
DOS737
|
|
DOS775
|
|
DOS850
|
|
DOS852
|
|
DOS857
|
|
DOS858
|
|
DOS860
|
|
DOS861
|
|
DOS862
|
|
DOS863
|
|
DOS864
|
|
DOS865
|
|
DOS866
|
|
DOS869
|
|
DU_NL
|
|
EN_UK
|
|
EN_US
|
|
ES_ES
|
|
ES_ES_CI_AI
|
|
EUCJ_0208
|
|
FI_FI
|
|
FR_CA
|
|
FR_CA_CI_AI
|
|
FR_FR
|
|
FR_FR_CI_AI
|
|
GB18030
|
|
GB18030_UNICODE
|
|
GBK
|
|
GBK_UNICODE
|
|
GB_2312
|
|
ISO8859_1
|
|
ISO8859_13
|
|
ISO8859_2
|
|
ISO8859_3
|
|
ISO8859_4
|
|
ISO8859_5
|
|
ISO8859_6
|
|
ISO8859_7
|
|
ISO8859_8
|
|
ISO8859_9
|
|
ISO_HUN
|
|
ISO_PLK
|
|
IS_IS
|
|
IT_IT
|
|
KOI8R
|
|
KOI8R_RU
|
|
KOI8U
|
|
KOI8U_UA
|
|
KSC_5601
|
|
KSC_DICTIONARY
|
|
LT_LT
|
|
NEXT
|
|
NONE
|
|
NO_NO
|
|
NXT_DEU
|
|
NXT_ESP
|
|
NXT_FRA
|
|
NXT_ITA
|
|
NXT_US
|
|
OCTETS
|
|
PDOX_ASCII
|
|
PDOX_CSY
|
|
PDOX_CYRL
|
|
PDOX_HUN
|
|
PDOX_INTL
|
|
PDOX_ISL
|
|
PDOX_NORDAN4
|
|
PDOX_PLK
|
|
PDOX_SLO
|
|
PDOX_SWEDFIN
|
|
PT_BR
|
|
PT_PT
|
|
PXW_CSY
|
|
PXW_CYRL
|
|
PXW_GREEK
|
|
PXW_HUN
|
|
PXW_HUNDC
|
|
PXW_INTL
|
|
PXW_INTL850
|
|
PXW_NORDAN4
|
|
PXW_PLK
|
|
PXW_SLOV
|
|
PXW_SPAN
|
|
PXW_SWEDFIN
|
|
PXW_TURK
|
|
SJIS_0208
|
|
SV_SV
|
|
TIS620
|
|
TIS620_UNICODE
|
|
UCS_BASIC
|
|
UNICODE
|
|
UNICODE_CI
|
|
UNICODE_CI_AI
|
|
UNICODE_FSS
|
|
UTF8
|
|
WIN1250
|
|
WIN1251
|
|
WIN1251_UA
|
|
WIN1252
|
|
WIN1253
|
|
WIN1254
|
|
WIN1255
|
|
WIN1256
|
|
WIN1257
|
|
WIN1257_EE
|
|
WIN1257_LT
|
|
WIN1257_LV
|
|
WIN1258
|
|
WIN_CZ
|
|
WIN_CZ_CI_AI
|
|
WIN_PTBR
|
|
|
|
Roles:
|
|
RDB$ADMIN
|
|
"""
|
|
|
|
@pytest.mark.version('>=4.0')
|
|
def test_2(act_2: Action):
|
|
act_2.expected_stdout = expected_stdout_2
|
|
act_2.execute()
|
|
assert act_2.clean_expected_stdout == act_2.clean_stdout
|
|
|