diff --git a/tests/packages/undocumented_options/config.yml b/tests/packages/undocumented_options/config.yml new file mode 100644 index 00000000..76508f09 --- /dev/null +++ b/tests/packages/undocumented_options/config.yml @@ -0,0 +1,18 @@ +title: Package with undocumented sinol-make options +sinol_task_id: und + +sinol_undocumented_time_tool: time +sinol_undocumented_test_limits: true + +memory_limit: 10240 +time_limit: 1000 +time_limits: + 1a: 5000 + +sinol_expected_scores: + und.cpp: + expected: {1: OK} + points: 100 + und1.cpp: + expected: {1: OK} + points: 100 diff --git a/tests/packages/undocumented_options/in/.gitkeep b/tests/packages/undocumented_options/in/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/tests/packages/undocumented_options/out/.gitkeep b/tests/packages/undocumented_options/out/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/tests/packages/undocumented_options/prog/und.cpp b/tests/packages/undocumented_options/prog/und.cpp new file mode 100644 index 00000000..bd410607 --- /dev/null +++ b/tests/packages/undocumented_options/prog/und.cpp @@ -0,0 +1,9 @@ +#include + +using namespace std; + +int main() { + int a, b; + cin >> a >> b; + cout << a + b; +} diff --git a/tests/packages/undocumented_options/prog/und1.cpp b/tests/packages/undocumented_options/prog/und1.cpp new file mode 100644 index 00000000..23c0a790 --- /dev/null +++ b/tests/packages/undocumented_options/prog/und1.cpp @@ -0,0 +1,14 @@ +#include +#include + +using namespace std; +using namespace std::chrono_literals; + +int main() { + int a, b; + cin >> a >> b; + if (a == 1 && b == 1) { + this_thread::sleep_for(3s); + } + cout << a + b << endl; +} diff --git a/tests/packages/undocumented_options/prog/undingen.cpp b/tests/packages/undocumented_options/prog/undingen.cpp new file mode 100644 index 00000000..9c7b7beb --- /dev/null +++ b/tests/packages/undocumented_options/prog/undingen.cpp @@ -0,0 +1,13 @@ +#include + +using namespace std; + +int main() { + ofstream f("und1a.in"); + f << "1 1\n"; + f.close(); + + f.open("und1b.in"); + f << "2 2\n"; + f.close(); +} diff --git a/tests/util.py b/tests/util.py index e9d86bdd..5aa837cf 100644 --- a/tests/util.py +++ b/tests/util.py @@ -95,6 +95,13 @@ def get_long_name_package_path(): return os.path.join(os.path.dirname(__file__), "packages", "long_package_name") +def get_undocumented_options_package_path(): + """ + Get path to package with undocumented options in config.yml (/test/packages/undoc) + """ + return os.path.join(os.path.dirname(__file__), "packages", "undocumented_options") + + def create_ins(package_path): """ Create .in files for package.