-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from betacraft/RUB-10
RUB-10 Add test case for ruby vernac parser
- Loading branch information
Showing
11 changed files
with
115 additions
and
34 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
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
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,20 @@ | ||
RSpec.describe RubyVernacParser do | ||
subject do | ||
RubyVernacParser.new( | ||
source_file: Dir.pwd + '/spec/stubs/ruby_vernac_parser/example.rb', | ||
keywords_file: Dir.pwd + '/spec/stubs/ruby_vernac_parser/keywords.yml' | ||
) | ||
end | ||
|
||
describe "#parse" do | ||
it "returns translated code from hindi language to english language" do | ||
expect{ subject.parse }.to output("Parsed code -\ndef कितने_आदमी_थे\nputs \"२ सरकार।\"\nend\n\nकितने_आदमी_थे()\n").to_stdout | ||
end | ||
end | ||
|
||
describe "#execute" do | ||
it "" do | ||
expect{ subject.execute }.to output("Script Output -\n२ सरकार।\n").to_stdout | ||
end | ||
end | ||
end |
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,5 @@ | ||
कार्य कितने_आदमी_थे | ||
छापो "२ सरकार।" | ||
समाप्त | ||
|
||
कितने_आदमी_थे() |
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,49 @@ | ||
--- | ||
BEGIN: शुरुआत | ||
END: आखिर | ||
alias: उपनाम | ||
and: और | ||
begin: शुरू | ||
break: विराम | ||
case: स्थिति | ||
class: सांचा | ||
def: कार्य | ||
do: करो | ||
else: वरना | ||
elsif: फिरअगर | ||
end: समाप्त | ||
ensure: सुनिश्चित | ||
false: झूठा | ||
for: इसलिए | ||
if: अगर | ||
in: में | ||
module: गुण | ||
next: अगला | ||
nil: कुछनहीं | ||
not: नहीं | ||
or: अथवा | ||
puts: छापो | ||
redo: फिरसेकरो | ||
rescue: बचाव | ||
retry: पुनःप्रयास | ||
return: लौटा | ||
self: स्वयं | ||
super: ऊपर | ||
then: फिर | ||
true: सच्चा | ||
unless: अगरनही | ||
until: जबतक | ||
when: जब | ||
while: जिसबीच | ||
yield: होनेदे | ||
require: आवश्यक | ||
0: ० | ||
1: १ | ||
2: २ | ||
3: ३ | ||
4: ४ | ||
5: ५ | ||
6: ६ | ||
7: ७ | ||
8: ८ | ||
9: ९ |
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