Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BIOS date retrieved from WMI are in the following format: 20050927******.******+*** According to Microsoft: http://msdn.microsoft.com/en-us/library/windows/desktop/aa394077(v=vs.85).aspx Release date of the Windows BIOS in the Coordinated Universal Time (UTC) format of YYYYMMDDHHMMSS.MMMMMMOOO. Thank you Arnaud for the details. closes: #1820 Reported-by: Arnaud Meurou <ameurou@live.fr>
- Loading branch information
Gonéri Le Bouder
committed
Nov 2, 2012
1 parent
da70e1a
commit b6fbcb9
Showing
3 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use utf8; | ||
use lib 't'; | ||
|
||
use English qw(-no_match_vars); | ||
use Test::More; | ||
use Test::MockModule; | ||
|
||
use FusionInventory::Test::Utils; | ||
|
||
BEGIN { | ||
# use mock modules for non-available ones | ||
push @INC, 't/fake/windows' if $OSNAME ne 'MSWin32'; | ||
} | ||
|
||
use FusionInventory::Agent::Task::Inventory::Input::Win32::Bios; | ||
|
||
my %tests = ( | ||
"20050927******.******+***" => "09/27/2005", | ||
"foobar" => "foobar" | ||
); | ||
plan tests => scalar keys %tests; | ||
|
||
foreach my $input (keys %tests) { | ||
my $result = $tests{$input}; | ||
|
||
ok(FusionInventory::Agent::Task::Inventory::Input::Win32::Bios::_dateFromIntString($input) eq $result, "_dateFromIntString($input)"); | ||
} |