summaryrefslogtreecommitdiff
path: root/gnulib-tests/test-userspec.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
commit71cd8e3a743046573744123777061b64881bf372 (patch)
tree82522befe647f4fff186a5630cad0cad33f8ef53 /gnulib-tests/test-userspec.c
parentc18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff)
downloadcoreutils-upstream.tar.gz
Imported Upstream version 8.24upstream/8.24upstream
Diffstat (limited to 'gnulib-tests/test-userspec.c')
-rw-r--r--gnulib-tests/test-userspec.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/gnulib-tests/test-userspec.c b/gnulib-tests/test-userspec.c
index 437049c4..638aa92e 100644
--- a/gnulib-tests/test-userspec.c
+++ b/gnulib-tests/test-userspec.c
@@ -1,5 +1,5 @@
/* Test userspec.c
- Copyright (C) 2009-2014 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,30 +45,30 @@ struct test
static struct test T[] =
{
- { "", -1, -1, "", "", NULL},
- { ":", -1, -1, "", "", NULL},
- { "0:0", 0, 0, "", "", NULL},
- { ":1", -1, 1, "", "", NULL},
- { "1", 1, -1, "", "", NULL},
- { ":+0", -1, 0, "", "", NULL},
- { "22:42", 22, 42, "", "", NULL},
+ { "", -1, -1, "", "", NULL},
+ { ":", -1, -1, "", "", NULL},
+ { "+0:+0", 0, 0, "", "", NULL},
+ { ":+1", -1, 1, "", "", NULL},
+ { "+1", 1, -1, "", "", NULL},
+ { ":+0", -1, 0, "", "", NULL},
+ { "+22:+42", 22, 42, "", "", NULL},
/* (uint32_t)-1 should be invalid everywhere */
- { "4294967295:4294967295", 0, 0, NULL, NULL, "invalid user"},
+ { "+4294967295:+4294967295", 0, 0, NULL, NULL, "invalid user"},
/* likewise, but with only the group being invalid */
- { "0:4294967295", 0, 0, NULL, NULL, "invalid group"},
- { ":4294967295", 0, 0, NULL, NULL, "invalid group"},
+ { "+0:+4294967295", 0, 0, NULL, NULL, "invalid group"},
+ { ":+4294967295", 0, 0, NULL, NULL, "invalid group"},
/* and only the user being invalid */
- { "4294967295:0", 0, 0, NULL, NULL, "invalid user"},
+ { "+4294967295:+0", 0, 0, NULL, NULL, "invalid user"},
/* and using 2^32 */
- { "4294967296:4294967296", 0, 0, NULL, NULL, "invalid user"},
- { "0:4294967296", 0, 0, NULL, NULL, "invalid group"},
- { ":4294967296", 0, 0, NULL, NULL, "invalid group"},
- { "4294967296:0", 0, 0, NULL, NULL, "invalid user"},
+ { "+4294967296:+4294967296", 0, 0, NULL, NULL, "invalid user"},
+ { "+0:+4294967296", 0, 0, NULL, NULL, "invalid group"},
+ { ":+4294967296", 0, 0, NULL, NULL, "invalid group"},
+ { "+4294967296:+0", 0, 0, NULL, NULL, "invalid user"},
/* numeric user and no group is invalid */
- { "4294967295:", 0, 0, NULL, NULL, "invalid spec"},
- { "4294967296:", 0, 0, NULL, NULL, "invalid spec"},
- { "1:", 0, 0, NULL, NULL, "invalid spec"},
- { "+0:", 0, 0, NULL, NULL, "invalid spec"},
+ { "+4294967295:", 0, 0, NULL, NULL, "invalid spec"},
+ { "+4294967296:", 0, 0, NULL, NULL, "invalid spec"},
+ { "+1:", 0, 0, NULL, NULL, "invalid spec"},
+ { "+0:", 0, 0, NULL, NULL, "invalid spec"},
/* "username:" must expand to UID:GID where GID is username's login group */
/* Add an entry like the following to the table, if possible.