Last active
December 17, 2015 08:49
-
-
Save mvidner/5582498 to your computer and use it in GitHub Desktop.
test the constant lookup issue
https://github.com/yast/yast-ruby-bindings/issues/17
This file contains hidden or 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
// if Modelist is imported here the test passes | |
{ | |
// import "Modelist"; | |
import "Intermediate"; | |
// Modelist::Hello(); | |
Intermediate::Hello(); | |
} |
This file contains hidden or 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
{ | |
module "Intermediate"; | |
import "Modelist"; | |
global void Hello() { | |
Modelist::Hello(); | |
} | |
} |
This file contains hidden or 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
{ | |
module "Modelist"; | |
string greeting = nil; | |
global void Hello() { | |
y2milestone("%1", greeting); | |
} | |
// Modelist - Konstruktor | |
global void Modelist() { | |
greeting = "Zdravstvuj!"; | |
} | |
} |
This file contains hidden or 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
#!/bin/bash | |
# test the constant lookup issue | |
# https://github.com/yast/yast-ruby-bindings/issues/17 | |
# run it from the ycp killer directory so that bundle exec finds y2r | |
DIR=$(dirname $0) | |
title() { | |
figlet $1 2> /dev/null && return | |
echo $1 | |
echo ==== | |
echo | |
} | |
y2r() { | |
bundle exec y2r --module-path $DIR/modules $DIR/$1 $DIR/ruby/${1%.ycp}.rb | |
} | |
cd $DIR | |
title YCP | |
ln -snf . modules | |
ln -snf . clients | |
ycpc -c modules/Modelist.ycp | |
Y2DIR=. ycpc -c modules/Intermediate.ycp | |
Y2DIR=. /usr/lib/YaST2/bin/y2base -l - constant-lookup UI | |
title RUBY | |
mkdir -p ruby/modules ruby/clients | |
cd - | |
y2r modules/Modelist.ycp | |
y2r modules/Intermediate.ycp | |
y2r clients/constant-lookup.ycp | |
Y2DIR=$DIR/ruby /usr/lib/YaST2/bin/y2base -l - constant-lookup UI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment