Commit graph

3899 commits

Author SHA1 Message Date
Zachary Folwick
ba17c42d38 added comments explaining why the test has to be scripted this way 2015-08-06 13:11:05 -07:00
Zachary Folwick
b0d7a2153e changed it statement to accurately reflect test 2015-08-06 11:31:30 -07:00
Aaron
316cabbdcf Got rid of tests for UTF7, added error checking, adding test to check for null paramater for codepage 2015-08-06 10:16:13 -07:00
Aaron
3aba128b6d Got rid of tests for UTF7, added error checking, adding test to check for null paramater for codepage 2015-08-06 10:16:13 -07:00
Peter Honeder
8daafecc67 Merge pull request 112 from dev/70-refactor-FileSystemProvider into develop 2015-08-06 14:44:43 +00:00
Peter Honeder
3137e26e98 added Pester test for mode flags in ls output 2015-08-06 16:35:06 +02:00
Peter Honeder
3cd7620413 re-pin to latest fixes, added small test for CreateJunction 2015-08-06 16:24:18 +02:00
Andrew Schwartzmeyer
ad91eb52c3
Add source flag to nuget.exe install
`-Source 'https://nuget.org/api/v2'`

Works around NuGet 3 issues. Necessary with the MonoProject's
mono-devel (which is used in the Docker build container).
2015-08-05 16:45:19 -07:00
Zachary Folwick
052165d15a added test to determine if output is correct 2015-08-05 16:01:10 -07:00
Andrew Schwartzmeyer
adc5cd7459 Update Docker build script to use fakelogin
fakelogin populates /var/run/utmp enough such that getlogin() works, and
is included in the latest Docker image.

Run `docker pull andschwa/magrathea` to update.
2015-08-05 15:35:20 -07:00
Aaron
8bf19f7144 updates to CMakeFile.txt 2015-08-05 13:28:12 -07:00
Aaron
8e5bfe3072 updates to CMakeFile.txt 2015-08-05 13:28:12 -07:00
Peter Honeder
c9cf2a42fa re-pin to latest cleanup 2015-08-05 15:50:36 +02:00
Peter Honeder
b2c7331f7c re-pin to latest refactoring fixes 2015-08-05 15:44:54 +02:00
Andrew Schwartzmeyer
1d18a810ab Update pinned monad-native 2015-08-04 18:38:04 -07:00
Andrew Schwartzmeyer
2ec0c2996f Use WCHAR sizes instead of CHAR sizes
Such that lpnSize is the length (number of UTF-16 characters, including
null) of the username. Must be multiplied by sizeof(char16_t) for bytes.
2015-08-04 18:31:54 -07:00
Andrew Schwartzmeyer
447896aede Use WCHAR sizes instead of CHAR sizes
Such that lpnSize is the length (number of UTF-16 characters, including
null) of the username. Must be multiplied by sizeof(char16_t) for bytes.
2015-08-04 18:31:54 -07:00
Andrew Schwartzmeyer
90de5ae488
Change mshttps to https for Pester submodule
Should not assume mshttps anyway, plus it's been deprecated.
2015-08-04 16:38:12 -07:00
Zachary Folwick
f24dfb02dc added Format-List test 2015-08-04 16:07:14 -07:00
Andrew Schwartzmeyer
2a6305ca11 Add passing GetUserName unit test
Updates monad-native submodule to include GetUserName P/Invoke, and
updates monad submodule to use said P/Invoke.

Matches the username against ^[a-z][a-z0-9\-]*$
2015-08-04 14:48:12 -07:00
Aaron
9ff9a88279 Made changes based off feedback from Peter. Also added more unit tests 2015-08-04 14:38:53 -07:00
Aaron
54618f1750 Made changes based off feedback from Peter. Also added more unit tests 2015-08-04 14:38:53 -07:00
Andrew Schwartzmeyer
7d007d6708 Remove PAL submodule 2015-08-04 14:16:57 -07:00
Andrew Schwartzmeyer
e64c8961c9 Update GetUserName tests
Note that these fail when run in a Docker container because a) the
current container's locale is not completely set, and b) getlogin()
returns null with ENOENT since /var/run/utmp is being mapped to the
host, and thus denied access from within the container.

The container needs the locale set and its own /run/utmp, see
https://lists.linuxcontainers.org/pipermail/lxc-users/2011-July/002374.html
2015-08-04 14:16:57 -07:00
Andrew Schwartzmeyer
b77b0a7e6c Update GetUserName tests
Note that these fail when run in a Docker container because a) the
current container's locale is not completely set, and b) getlogin()
returns null with ENOENT since /var/run/utmp is being mapped to the
host, and thus denied access from within the container.

The container needs the locale set and its own /run/utmp, see
https://lists.linuxcontainers.org/pipermail/lxc-users/2011-July/002374.html
2015-08-04 14:16:57 -07:00
Andrew Schwartzmeyer
d60bfe0376 Use icu for Unicode conversion and fix lpnSize
A careful reading of the GetUserName documentation and Windows Data
Types says that lpnSize is "the number of TCHARs copied to the
buffer...including the terminating null character," and a TCHAR in this
environment is a CHAR because we assume UNICODE is always defined for
CoreCLR. A CHAR is a byte. So lpSize is number of bytes, not number of
UTF-16 characters as we previously believed.
2015-08-04 14:16:49 -07:00
Andrew Schwartzmeyer
052ecc801d Use icu for Unicode conversion and fix lpnSize
A careful reading of the GetUserName documentation and Windows Data
Types says that lpnSize is "the number of TCHARs copied to the
buffer...including the terminating null character," and a TCHAR in this
environment is a CHAR because we assume UNICODE is always defined for
CoreCLR. A CHAR is a byte. So lpSize is number of bytes, not number of
UTF-16 characters as we previously believed.
2015-08-04 14:16:49 -07:00
Andrew Schwartzmeyer
6ddb39e337 Link ps against icu instead of scxcore
Remove scxcore library from CMake
2015-08-04 14:14:07 -07:00
Andrew Schwartzmeyer
84d24589be Link ps against icu instead of scxcore
Remove scxcore library from CMake
2015-08-04 14:14:07 -07:00
Zachary Folwick
f86f856ba6 undid failing test 2015-08-04 11:19:41 -07:00
Zachary Folwick
df8722dfc8 created a failing test for jenkins troubleshooting 2015-08-04 10:57:54 -07:00
Zachary Folwick
1a38a52e00 added format-table tests 2015-08-04 00:31:30 -07:00
Aaron
245b287443 added more error handling 2015-08-03 13:54:07 -07:00
Aaron
c979881804 added more error handling 2015-08-03 13:54:07 -07:00
Andrew Schwartzmeyer
0c9fb0d01b Rename userName in test to expectedUsername
To clarify that it is for comparison; not the result of GetUserName.
2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
011d8f41ea Rename userName in test to expectedUsername
To clarify that it is for comparison; not the result of GetUserName.
2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
b076850012 Refactor setting of lpnSize when buffer size is insufficient 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
d589ac1cbf Refactor setting of lpnSize when buffer size is insufficient 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
2a2c1d9236 Remove unnecessary static qualifier from const string 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
865fd0a56b Remove unnecessary static qualifier from const string 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
0592a37395 Use std::string instead of C99 dynamic array 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
b36cdcdc12 Use std::string instead of C99 dynamic array 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
9426e9c455 Use LOGIN_NAME_MAX instead of L_cuserid
Since L_cuserid is only for cuserid, not getlogin_r

Unit test for L_cuserid removed because the macro may not be available
on all platforms.
2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
bb8d0b793e Use LOGIN_NAME_MAX instead of L_cuserid
Since L_cuserid is only for cuserid, not getlogin_r

Unit test for L_cuserid removed because the macro may not be available
on all platforms.
2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
cbee353d0d Add more unit test coverage for GetUserName 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
e2d4ce0ab1 Add more unit test coverage for GetUserName 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
4a2c1c5a95 Set lpnSize when insufficient 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
876a88c7d8 Set lpnSize when insufficient 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
0f07a65f50 Use test fixture in GetUserName unit tests 2015-08-03 13:00:34 -07:00
Andrew Schwartzmeyer
edcb8b0402 Use test fixture in GetUserName unit tests 2015-08-03 13:00:34 -07:00