Skip to content

Commit

Permalink
Merge pull request #20 from briantist/master
Browse files Browse the repository at this point in the history
Culture revamp, cacheable resources, small tweaks and fixes
  • Loading branch information
dfinke committed Apr 20, 2019
2 parents 28fd72e + b9ea0a0 commit 76d14f3
Show file tree
Hide file tree
Showing 14 changed files with 549 additions and 73 deletions.
539 changes: 483 additions & 56 deletions NameIT.psm1

Large diffs are not rendered by default.

23 changes: 6 additions & 17 deletions __tests__/nameit.tests.ps1
@@ -1,27 +1,16 @@
Import-Module "$PSScriptRoot/../NameIT.psd1"
Import-Module "$PSScriptRoot/../NameIT.psd1" -Force

Describe "NameIT Tests" {

Clear-CacheStore

It "Should generate five entries" {
$actual = Invoke-Generate -Template "[person]" -Count 5
$actual.count | Should Be 5
}

# It "Should pass on 5.1 and 6" {
# (Get-WmiObject win32_bios) | Should Not Be Null
# }

It "Should pass 5.1 and 6" {
(Get-CimInstance win32_bios) | Should Not Be Null
It "Should return a culture-specific space character" {
$actual = Invoke-Generate -Template '[space 1 ja-JP]'
$actual -as [char] -as [int] | Should Be 12288
}

# It "Should fail on Linux" {
# "" | Set-Content "$PSScriptRoot\Test.txt"
# (Test-Path "$PSScriptRoot\test.txt") | Should Be $true
# }

# It "Should pass on Linux - correct case" {
# "" | Set-Content "$PSScriptRoot\test.txt"
# (Test-Path "$PSScriptRoot\test.txt") | Should Be $true
# }
}
19 changes: 19 additions & 0 deletions cultures/en/GB/colors.txt
@@ -0,0 +1,19 @@
amber
beige
black
blue
brown
crimson
cyan
grey
green
indigo
khaki
magenta
orange
pink
purple
red
violet
white
yellow
File renamed without changes.
19 changes: 19 additions & 0 deletions cultures/en/colors.txt
@@ -0,0 +1,19 @@
amber
beige
black
blue
brown
crimson
cyan
gray
green
indigo
khaki
magenta
orange
pink
purple
red
violet
white
yellow
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions cultures/en/space.txt
@@ -0,0 +1 @@

File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions cultures/ja/colors.txt
@@ -0,0 +1,20 @@
黄色
茶色
桃色
橙色
灰色
ブラック
丹色
ブリュ
褐色
淡紅色
ピンク
オレンジ
鼠色
パープル
1 change: 1 addition & 0 deletions cultures/ja/space.txt
@@ -0,0 +1 @@

0 comments on commit 76d14f3

Please sign in to comment.