summaryrefslogtreecommitdiffstats
path: root/Programs
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-08-01 01:07:18 (GMT)
committerGitHub <noreply@github.com>2018-08-01 01:07:18 (GMT)
commitea68d83933e6de6cabfb115ec1b8888301947369 (patch)
tree2a9d320ba9050009dc46f48dbd19a7b66c8c4879 /Programs
parent9851227382431a40a138fdff994278d9e7743c74 (diff)
downloadcpython-ea68d83933e6de6cabfb115ec1b8888301947369.zip
cpython-ea68d83933e6de6cabfb115ec1b8888301947369.tar.gz
cpython-ea68d83933e6de6cabfb115ec1b8888301947369.tar.bz2
bpo-34170: _PyCoreConfig_Read() defaults to argc=0 (GH-8595)
Add unit tests for argc and argv of _PyCoreConfig.
Diffstat (limited to 'Programs')
-rw-r--r--Programs/_testembed.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 1cdc4c3..1c72580 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -335,7 +335,17 @@ dump_config(void)
printf("pycache_prefix = %ls\n", config->pycache_prefix);
printf("program_name = %ls\n", config->program_name);
ASSERT_STR_EQUAL(config->program_name, Py_GetProgramName());
- /* FIXME: test argc/argv */
+
+ printf("argc = %i\n", config->argc);
+ printf("argv = [");
+ for (int i=0; i < config->argc; i++) {
+ if (i) {
+ printf(", ");
+ }
+ printf("\"%ls\"", config->argv[i]);
+ }
+ printf("]\n");
+
printf("program = %ls\n", config->program);
/* FIXME: test xoptions */
/* FIXME: test warnoptions */