Andrew Schwartzmeyer
9a42b894f2
Convert to Allman style with 4-space indentation
2015-08-07 18:43:58 -07:00
Andrew Schwartzmeyer
095ef2c385
Assert GetUserName unit test against whoami
2015-08-07 16:56:19 -07:00
Andrew Schwartzmeyer
b1ef23d707
Merge branch 'develop' into dev/67-GetUserName
2015-08-07 16:00:59 -07:00
Zach Folwick
5979596de2
Merge pull request 109 from dev/153-format-list-tests into develop
2015-08-07 21:51:42 +00:00
Zachary Folwick
749a92dff8
made string calls more precise
2015-08-07 14:52:19 -07:00
Andrew Schwartzmeyer
d35e13afdb
Fix list of props test and merge cruft
2015-08-07 14:39:17 -07:00
Zachary Folwick
6ef2590331
merged changes from upstream
2015-08-07 14:25:38 -07:00
Zachary Folwick
fd8a9d25ac
added a beforeEach clause
2015-08-07 14:12:40 -07:00
Andrew Schwartzmeyer
f4e84a84bd
Refactor and add tests
2015-08-07 14:07:03 -07:00
Andrew Schwartzmeyer
e5ca617d2a
Repin monad and monad-native
2015-08-07 13:11:21 -07:00
Andrew Schwartzmeyer
f35efda7e7
Add -Wall to CMAKE_CXX_FLAGS
2015-08-07 12:07:19 -07:00
Andrew Schwartzmeyer
da1e65cfaf
Add -Wall to CMAKE_CXX_FLAGS
2015-08-07 12:07:19 -07:00
Andrew Schwartzmeyer
467fdeeb0c
Map getlogin_r()'s ERANGE to ERROR_GEN_FAILURE
...
ERROR_INSUFFICIENT_BUFFER should never occur here and would be a
misleading error for the user.
2015-08-07 12:05:07 -07:00
Andrew Schwartzmeyer
665f8f1e87
Map getlogin_r()'s ERANGE to ERROR_GEN_FAILURE
...
ERROR_INSUFFICIENT_BUFFER should never occur here and would be a
misleading error for the user.
2015-08-07 12:05:07 -07:00
Andrew Schwartzmeyer
062eb5a7b4
Fix style issues
...
- Use Doxygen style comments (with better comments)
- Use `type* ident` instead of `type *ident`
- Start { on new lines
- Use TRUE/FALSE from PAL.H
2015-08-07 12:03:31 -07:00
Andrew Schwartzmeyer
f8e9dfde8c
Fix style issues
...
- Use Doxygen style comments (with better comments)
- Use `type* ident` instead of `type *ident`
- Start { on new lines
- Use TRUE/FALSE from PAL.H
2015-08-07 12:03:31 -07:00
Zachary Folwick
22348bdb91
removed unnecessary comments and matched style
2015-08-07 11:34:36 -07:00
Zachary Folwick
a8a8e2091c
changed filtering test to be better
2015-08-07 11:31:50 -07:00
Zachary Folwick
bbed466ada
resolved style and readability comments
2015-08-07 10:12:37 -07:00
Andrew Schwartzmeyer
1b18bfd5e1
Clean up CMakeLists
2015-08-06 17:03:53 -07:00
Andrew Schwartzmeyer
c8f9777481
Clean up CMakeLists
2015-08-06 17:03:53 -07:00
Zachary Folwick
49d5bf1121
added custom powershell object to properly mock the test function
2015-08-06 16:40:10 -07:00
Andrew Schwartzmeyer
afab62205a
Rename to GetUserNameW since it is Unicode
2015-08-06 16:28:29 -07:00
Andrew Schwartzmeyer
b379fb4a6b
Rename to GetUserNameW since it is Unicode
2015-08-06 16:28:29 -07:00
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