Comments (2)
テストパターン
ファイル数に応じたテストを実施するのが良さそう。
ファイルが何もない場合
(何も表示されない)
❯ ls
ファイル数が1の場合
❯ ls
1
ファイル数が2の場合
❯ ls
1 2
ファイル数が3の場合
❯ ls
1 2 3
ファイル数が4の場合
❯ ls
1 3
2 4
ファイル数が5の場合
❯ ls
1 3 5
2 4
ファイル数が6の場合
❯ ls
1 3 5
2 4 6
ファイル数が7の場合
❯ ls
1 4 7
2 5
3 6
ファイル数が8の場合
❯ ls
1 4 7
2 5 8
3 6
ファイル数が9の場合
❯ ls
1 4 7
2 5 8
3 6 9
ファイル数が10の場合
❯ ls
1 4 8
10 5 9
2 6
3 7
※ ファイル名の順に表示されるため、1, 10, 2 ...
という並びになっている。
from ruby-practices.
ファイル名の文字数が異なる場合も考慮して、最終的には、実際にあるファイルでテストを実施した方が良さそう。
~/RubymineProjects/fjord-boot-camp/ruby-practices
❯ ls
01.fizzbuzz 05.ls 09.wc_object
02.calendar 06.wc README.md
03.rake 07.bowling_object
04.bowling 08.ls_object
from ruby-practices.
Related Issues (20)
- 表示したい月の最初の日から最後の日までを表示する HOT 2
- 日付が1桁の場合は、左に半角スペースが1つ多く入るようにする HOT 1
- 今月の最初の日の曜日を取得して、日付の開始位置を曜日に合わせる HOT 1
- 土曜日の後を改行して表示する HOT 1
- コマンドラインオプションで不正なオプションが指定された場合の考慮を追加 HOT 3
- 今日の日付部分の色を反転させる HOT 1
- 04. ボウリングのスコア計算プログラム HOT 2
- 仕様を確認する HOT 4
- 実装する機能の洗い出しと実現方法の調査 HOT 2
- フローチャートを作成する HOT 1
- lsコマンド1を作成する HOT 2
- lsコマンド2を作成する HOT 1
- lsコマンド2|仕様と実現方法
- lsコマンド2|テストパターンの検討
- lsコマンド2|フローチャート
- lsコマンド3を作成する
- lsコマンド4を作成する HOT 1
- lsコマンド5を作成する
- wc コマンドを作成する HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-practices.