test_that("Read rcl file without error", { expect_no_error(read_log(test_path("20220405162804-HELIOS_base_3-vs-enemy_2.rcl"))) }) test_that("Read rcg file without error", { expect_no_error(read_log(test_path("20220405162804-HELIOS_base_3-vs-enemy_2.rcg"))) }) test_that("All items in rcg file must be retained", { rcg <- read_log(test_path("20220405162804-HELIOS_base_3-vs-enemy_2.rcg")) expect_true("header" %in% names(rcg)) expect_true("server_param" %in% names(rcg)) expect_true("player_param" %in% names(rcg)) expect_true("player_type" %in% names(rcg)) expect_true("team" %in% names(rcg)) expect_true("show" %in% names(rcg)) expect_true("msg" %in% names(rcg)) }) test_that("Do not read file that is not log file", { expect_error(read_log(test_path("not_log_file.txt"))) })