Class: Modsvaskr::TestsSuites::InteriorCell
- Inherits:
-
Modsvaskr::TestsSuite
- Object
- Modsvaskr::TestsSuite
- Modsvaskr::TestsSuites::InteriorCell
- Includes:
- InGameTestsSuite
- Defined in:
- lib/modsvaskr/tests_suites/interior_cell.rb
Overview
Test interior cells by using coc and camera spanning
Instance Method Summary collapse
-
#discover_tests ⇒ Object
Discover the list of tests information that could be run.
-
#in_game_tests_suite ⇒ Object
Return the in-game tests suite to which we forward the tests to be run.
Methods included from InGameTestsSuite
#in_game_tests_for, #parse_auto_tests_statuses_for
Methods inherited from Modsvaskr::TestsSuite
#clear_tests, #initialize, #statuses, #statuses=
Methods included from Logger
#log, #out, #wait_for_user_enter
Methods included from RunCmd
Constructor Details
This class inherits a constructor from Modsvaskr::TestsSuite
Instance Method Details
#discover_tests ⇒ Object
Discover the list of tests information that could be run.
- API
-
This method is mandatory
-
- Result
-
Hash< String, Hash<Symbol,Object> >: Ordered hash of test information, per test name
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/modsvaskr/tests_suites/interior_cell.rb', line 25 def discover_tests # List of interior cells, per plugin name # Hash< String, Array<String> > interior_cells = {} @game.xedit.run_script('DumpInfo', only_once: true) @game.xedit.parse_csv('Modsvaskr_ExportedDumpInfo') do |row| esp_name, record_type = row[0..1] if record_type.downcase == 'cell' cell_type, cell_name = row[3..4] if cell_type == 'coc' esp_name.downcase! interior_cells[esp_name] = [] unless interior_cells.key?(esp_name) interior_cells[esp_name] << cell_name end end end # Test only interior cells that have been changed by mods vanilla_esps = @game.game_esps vanilla_interior_cells = vanilla_esps.map { |esp_name| interior_cells[esp_name] || [] }.flatten.sort.uniq interior_cells. map { |esp_name, esp_cells| vanilla_esps.include?(esp_name) ? [] : vanilla_interior_cells & esp_cells }. flatten. sort. uniq. to_h do |cell_name| [ cell_name, { name: "Load cell #{cell_name}" } ] end end |
#in_game_tests_suite ⇒ Object
Return the in-game tests suite to which we forward the tests to be run
- Result
-
Symbol: In-game tests suite
16 17 18 |
# File 'lib/modsvaskr/tests_suites/interior_cell.rb', line 16 def in_game_tests_suite :locations end |