Bug #347 - Confirmation dialog is lowercase for "all"

- changed confirmation to be now "All" for multiple changes
- added unit tests for all answers to multiple changes
This commit is contained in:
Federico Hernandez
2009-12-09 01:11:14 +01:00
parent 7acef0c9fd
commit b684ded845
3 changed files with 39 additions and 5 deletions

View File

@@ -84,7 +84,7 @@ int confirm3 (const std::string& question)
std::vector <std::string> options;
options.push_back ("Yes");
options.push_back ("no");
options.push_back ("all");
options.push_back ("All");
std::string answer;
std::vector <std::string> matches;
@@ -105,7 +105,7 @@ int confirm3 (const std::string& question)
while (matches.size () != 1);
if (matches[0] == "Yes") return 1;
else if (matches[0] == "all") return 2;
else if (matches[0] == "All") return 2;
else return 0;
}
@@ -119,7 +119,7 @@ int confirm4 (const std::string& question)
std::vector <std::string> options;
options.push_back ("Yes");
options.push_back ("no");
options.push_back ("all");
options.push_back ("All");
options.push_back ("quit");
std::string answer;
@@ -142,7 +142,7 @@ int confirm4 (const std::string& question)
while (matches.size () != 1);
if (matches[0] == "Yes") return 1;
else if (matches[0] == "all") return 2;
else if (matches[0] == "All") return 2;
else if (matches[0] == "quit") return 3;
else return 0;
}