0025133: TKOpenGl - Crash on closing a view containing presentations with capping
[occt.git] / tests / demo / testsystem / locate_data_file
CommitLineData
b725d7c5 1# Test procedure locate_data_file
2
3# add path to subdirectory tests_data to CSF_TestDataPath,
4# for testing of files search procedure
5set addpath [file dirname [info script]]/tests_data
6if { ! [info exists env(CSF_TestDataPath)] } {
7 set env(CSF_TestDataPath) $addpath
8} elseif { ! [regexp "$addpath" $env(CSF_TestDataPath)] } {
9 set env(CSF_TestDataPath) "$env(CSF_TestDataPath)[_path_separator]$addpath"
10}
11
12puts "CSF_TestDataPath set to $env(CSF_TestDataPath)"
13
14# Failed search
15if [catch {locate_data_file file1.empty} path] {
16 puts "Data file file1.empty not found, that is OK"
17} else {
18 error "Data file file1.empty is found at $path, while it should not be"
19}
20
21# Successful search
22puts "Data file 2 found in [locate_data_file file2.empty]"
23puts "Data file 3 found in [locate_data_file file3.empty]"
24puts "Data file 4 found in [locate_data_file file4.empty]"
25puts "Data file 5 found in [locate_data_file file5.empty]"
26
27# Failed search
28if [catch {locate_data_file file6.empty} path] {
29 puts "Data file file6.empty not found, that is OK"
30} else {
31 error "Data file file6.empty is found at $path, while it should not be"
32}
33
34
35puts "TEST COMPLETED"