[Mono-dev] Fixing bug 39915 (DriveInfo.VolumeLabel does not return Volume Label under Windows)

Rafael Teixeira monoman at gmail.com
Fri Apr 7 13:48:56 UTC 2017


You could start a process (console) and capture the standard output, and in
it call 'dir'. It is convoluted but I do it frequently for testing
interactions between multiple processes.

Rafael Teixeira
O..:.)oooo

On Fri, Apr 7, 2017 at 10:28 AM, HKakuschke <horst at kakuschke.de> wrote:

> Hi,
>
> as I recently also suffered from Bug 39915 under Windows OS, I would like
> to
> fix that.
>
> Handling volume labels under Windows OS could be done via Windows API
> functions GetVolumeInformation() and SetVolumeLabel() respectively (like
> getting DriveInfo.TotalFreeSpace is handled via Windows API function
> GetDiskFreeSpace()).
>
> But, I just don't have any idea how to write test cases for this:
> - to test the getter of DriveInfo.VolumeLabel one would need to know the
> volume labels of the drives of the test machine
> - to test the setter of DriveInfo.VolumeLabel one would have to alter the
> volume label of at least one of the drives of the test machine.
>
> Any suggestions or ideas?
>
> Thanks,
> Horst
>
>
>
> --
> View this message in context: http://mono.1490590.n4.nabble.
> com/Fixing-bug-39915-DriveInfo-VolumeLabel-does-
> not-return-Volume-Label-under-Windows-tp4670441.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.dot.net
> http://lists.dot.net/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-devel-list/attachments/20170407/f04aa04e/attachment.html>


More information about the Mono-devel-list mailing list