diff --git a/.gitignore b/.gitignore index 30d471be0..a5e502816 100644 --- a/.gitignore +++ b/.gitignore @@ -37,12 +37,8 @@ library/*/test/**/*.trs /test-driver coverage -doc/yast.8 - - # Generated /library/general/src/modules/Version.rb -library/network/src/scrconf/network.scr missing library/packages/src/packages /.yardoc @@ -58,4 +54,3 @@ home:*:* YaST:Head *.sw? library/modules/Version.ycp -library/network/agents/network.scr diff --git a/.rubocop.yml b/.rubocop.yml index 6896c438f..80d1a9243 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -59,6 +59,19 @@ Style/FileName: Style/MethodName: Include: - "library/*/src/lib/**/*.rb" + Exclude: + - "library/network/src/lib/network/susefirewall.rb" + - "library/network/src/lib/network/susefirewallservices.rb" + - "library/network/src/lib/network/susefirewalld.rb" + - "library/network/src/lib/network/susefirewalldservices.rb" + - "library/network/src/lib/network/susefirewall2.rb" + - "library/network/src/lib/network/susefirewall2services.rb" + +Style/Next: + # skip this check for SuSEFirewall modules since it forces us to + # refactor the code in a sub-optimal way. + Exclude: + - "library/network/src/lib/network/susefirewalld.rb" # keep it as it is part of API for old code Style/PredicateName: @@ -73,3 +86,8 @@ Style/TrivialAccessors: Style/VariableName: Include: - "library/*/src/lib/**/*.rb" + Exclude: + - "library/network/src/lib/network/susefirewall.rb" + - "library/network/src/lib/network/susefirewalld.rb" + - "library/network/src/lib/network/susefirewall2.rb" + - "library/network/src/lib/network/susefirewall2services.rb" diff --git a/Makefile.cvs b/Makefile.cvs deleted file mode 100644 index dc62f6873..000000000 --- a/Makefile.cvs +++ /dev/null @@ -1,21 +0,0 @@ -# -# Makefile.cvs -# - -LIB = $(shell y2tool get-lib) - -configure: all - ./configure --libdir=/usr/$(LIB) --sysconfdir=/etc - -all: - y2tool y2autoconf - y2tool y2automake - autoreconf --force --install - -install: configure - make - make install - -reconf: all - ./config.status --recheck - ./config.status diff --git a/Rakefile b/Rakefile index 2432dd52a..c51ecf4ac 100644 --- a/Rakefile +++ b/Rakefile @@ -3,4 +3,15 @@ require "yast/rake" Yast::Tasks.configuration do |conf| # lets ignore license check for now conf.skip_license_check << /.*/ + conf.install_locations["data/XVersion"] = File.join(Packaging::Configuration::DESTDIR, "/etc/YaST2/") + conf.install_locations["scripts/yast2-completion.sh"] = File.join(Packaging::Configuration::DESTDIR, "/usr/share/bash-completion/completions") + conf.install_locations["scripts/yast2-funcs"] = File.join(Packaging::Configuration::YAST_LIB_DIR, "/bin/") + conf.install_locations["scripts/yast2"] = File.join(Packaging::Configuration::DESTDIR, "/usr/sbin/") + conf.install_locations["scripts/yast"] = File.join(Packaging::Configuration::DESTDIR, "/usr/sbin/") + conf.install_locations["scripts/legacy_sbin/*"] = File.join(Packaging::Configuration::DESTDIR, "/sbin/") + conf.install_locations["scripts/save_y2logs"] = File.join(Packaging::Configuration::DESTDIR, "/usr/sbin/") + conf.install_locations["COPYING"] = conf.install_doc_dir + conf.install_locations["doc/yast*.8"] = File.join(Packaging::Configuration::DESTDIR, "/usr/share/man/man8/") + conf.install_locations["library/desktop/groups/*.desktop"] = File.join(Packaging::Configuration::DESTDIR, "/usr/share/applications/YaST2/groups/") + conf.install_locations["library/general/hooks/README.md"] = File.join(Packaging::Configuration::DESTDIR, "/var/lib/YaST2/hooks/") end diff --git a/configure.in.in b/configure.in.in deleted file mode 100644 index 879842608..000000000 --- a/configure.in.in +++ /dev/null @@ -1,26 +0,0 @@ - -## initialize -@YAST2-INIT-COMMON@ -@YAST2-INIT-YCP@ - -## some common checks -@YAST2-CHECKS-COMMON@ -@YAST2-CHECKS-YCP@ -@YAST2-CHECKS-TESTSUITE@ - -AC_MSG_CHECKING([for ifcfg location]) -# fallback, default on openSUSE -IFCFG_DIR=/etc/sysconfig/network -for TRY in /etc/sysconfig/network-scripts; do - if test -d $TRY; then - IFCFG_DIR=$TRY - break - fi -done -AC_SUBST([IFCFG_DIR]) -AC_MSG_RESULT([$IFCFG_DIR]) - -## and generate the output -# also done via makefile -AC_CONFIG_FILES(library/network/src/scrconf/network.scr) -@YAST2-OUTPUT@ diff --git a/data/Makefile.am b/data/Makefile.am deleted file mode 100644 index 5742fa244..000000000 --- a/data/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Makefile.am for yast2/data -# - -xversiondir = $(sysconfdir)/YaST2 - -xversion_DATA = \ - XVersion - -scalabledir = @icondir@/hicolor/scalable/apps -scalable_DATA = \ - icons/hicolor/scalable/apps/yast-hardware-group.svg \ - icons/hicolor/scalable/apps/yast-high_availability-group.svg \ - icons/hicolor/scalable/apps/yast-messages.svg \ - icons/hicolor/scalable/apps/yast-misc-group.svg \ - icons/hicolor/scalable/apps/yast-network-group.svg \ - icons/hicolor/scalable/apps/yast-remote-chooser.svg \ - icons/hicolor/scalable/apps/yast-remote-install.svg \ - icons/hicolor/scalable/apps/yast-security-group.svg \ - icons/hicolor/scalable/apps/yast-software-group.svg \ - icons/hicolor/scalable/apps/yast-support-group.svg \ - icons/hicolor/scalable/apps/yast-system-group.svg \ - icons/hicolor/scalable/apps/yast-vm-group.svg \ - icons/hicolor/scalable/apps/yast.svg - -EXTRA_DIST = $(xversion_DATA) $(scalable_DATA) -include $(top_srcdir)/Makefile.am.common diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index c63296015..000000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -# -# Makefile.am for y2c_network/doc -# - -doc_DATA = -html_DATA = -man_MANS = yast2.8 yast.8 - -yast.8: - ln -snf yast2.8 yast.8 - -EXTRA_DIST = $(doc_DATA) $(html_DATA) $(man_MANS) diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am deleted file mode 100644 index e078bacb7..000000000 --- a/doc/examples/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# -# Makefile.am for y2l_wizard/doc/examples -# - -examplesdir = $(docdir)/wizard/examples - -examples_DATA = $(wildcard *.ycp) $(wildcard start*) - -EXTRA_DIST = $(examples_DATA) diff --git a/doc/screenshots/Makefile.am b/doc/screenshots/Makefile.am deleted file mode 100644 index def9d4655..000000000 --- a/doc/screenshots/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# -# Makefile.am for yast2/doc/screenshots -# - -docdir = @docdir@/autodocs/screenshots -htmldir = $(docdir) - -html_DATA = $(wildcard *.png) -EXTRA_DIST = $(html_DATA) diff --git a/doc/yast.8 b/doc/yast.8 new file mode 120000 index 000000000..529d6d7ed --- /dev/null +++ b/doc/yast.8 @@ -0,0 +1 @@ +yast2.8 \ No newline at end of file diff --git a/library/Makefile.am b/library/Makefile.am deleted file mode 100644 index 5168e85df..000000000 --- a/library/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -# Makefile.am for yast2/library - -SUBDIRS = types sequencer xml commandline desktop wizard control cwm log system packages network gpg general systemd diff --git a/library/commandline/Makefile.am b/library/commandline/Makefile.am deleted file mode 100644 index 146d191d1..000000000 --- a/library/commandline/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# -# Makefile.am for yast2/library/commandline -# - -SUBDIRS = src testsuite test diff --git a/library/commandline/src/Makefile.am b/library/commandline/src/Makefile.am deleted file mode 100644 index 36d1d0734..000000000 --- a/library/commandline/src/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/CommandLine.rb - -client_DATA = \ - clients/other_tools_warning.rb - -scrconf_DATA = \ - scrconf/tty.scr - -agent_SCRIPTS = \ - servers_non_y2/ag_tty - -EXTRA_DIST = $(module_DATA) $(scrconf_DATA) $(agent_SCRIPTS) $(client_DATA) - -include $(top_srcdir)/Makefile.am.common diff --git a/library/commandline/test/Makefile.am b/library/commandline/test/Makefile.am deleted file mode 100644 index 3d5522482..000000000 --- a/library/commandline/test/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -TESTS = \ - commandline_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS) test_helper.rb diff --git a/library/commandline/testsuite/Makefile.am b/library/commandline/testsuite/Makefile.am deleted file mode 100644 index 956c637e3..000000000 --- a/library/commandline/testsuite/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -Y2BASEFLAGS = -I tests -export Y2BASEFLAGS - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff --git a/library/commandline/testsuite/tests/cmdmap1.err b/library/commandline/testsuite/tests/cmdmap1.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/cmdmap1.out b/library/commandline/testsuite/tests/cmdmap1.out deleted file mode 100644 index 379c01637..000000000 --- a/library/commandline/testsuite/tests/cmdmap1.out +++ /dev/null @@ -1,3 +0,0 @@ -Return true -Return false -Return false diff --git a/library/commandline/testsuite/tests/cmdmap1.rb b/library/commandline/testsuite/tests/cmdmap1.rb deleted file mode 100644 index d898ca45d..000000000 --- a/library/commandline/testsuite/tests/cmdmap1.rb +++ /dev/null @@ -1,51 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: cmpmap1.ycp -# Package: yast2 -# Summary: sanity validation of the command line map -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Cmdmap1Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # map must define id and global help - TEST(->() { CommandLine.Init({}, []) }, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Cmdmap1Client.new.main diff --git a/library/commandline/testsuite/tests/cmdmap2.err b/library/commandline/testsuite/tests/cmdmap2.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/cmdmap2.out b/library/commandline/testsuite/tests/cmdmap2.out deleted file mode 100644 index 379c01637..000000000 --- a/library/commandline/testsuite/tests/cmdmap2.out +++ /dev/null @@ -1,3 +0,0 @@ -Return true -Return false -Return false diff --git a/library/commandline/testsuite/tests/cmdmap2.rb b/library/commandline/testsuite/tests/cmdmap2.rb deleted file mode 100644 index b0f6e6ba2..000000000 --- a/library/commandline/testsuite/tests/cmdmap2.rb +++ /dev/null @@ -1,55 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: cmpmap2.ycp -# Package: yast2 -# Summary: sanity validation of the command line map -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Cmdmap2Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "TypeRepository" - Yast.import "CommandLine" - - textdomain "empty" - - # map must define reasonable id - TEST(lambda do - CommandLine.Init({ "id" => "", "help" => _("This is testsuite") }, []) - end, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Cmdmap2Client.new.main diff --git a/library/commandline/testsuite/tests/cmdmap3.err b/library/commandline/testsuite/tests/cmdmap3.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/cmdmap3.out b/library/commandline/testsuite/tests/cmdmap3.out deleted file mode 100644 index 41066fa71..000000000 --- a/library/commandline/testsuite/tests/cmdmap3.out +++ /dev/null @@ -1,5 +0,0 @@ -Log Command line specification does not define global help for the module -Log Command line specification does not define help for action 'wrongaction' -Return false -Return true -Return true diff --git a/library/commandline/testsuite/tests/cmdmap3.rb b/library/commandline/testsuite/tests/cmdmap3.rb deleted file mode 100644 index fa2aa8268..000000000 --- a/library/commandline/testsuite/tests/cmdmap3.rb +++ /dev/null @@ -1,62 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: cmpmap3.ycp -# Package: yast2 -# Summary: sanity validation of the command line map -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Cmdmap3Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # map must define help for each action - TEST(lambda do - CommandLine.Init( - { - "id" => "testsuite", - "actions" => { - "okaction" => { "help" => "This action should be ok" }, - "wrongaction" => { "key" => nil } - } - }, - [] - ) - end, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Cmdmap3Client.new.main diff --git a/library/commandline/testsuite/tests/cmdmap4.err b/library/commandline/testsuite/tests/cmdmap4.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/cmdmap4.out b/library/commandline/testsuite/tests/cmdmap4.out deleted file mode 100644 index 0da1b0b75..000000000 --- a/library/commandline/testsuite/tests/cmdmap4.out +++ /dev/null @@ -1,6 +0,0 @@ -Log Command line specification does not define typespec for option 'noenumpoption' -Log Command line specification does not define help for option 'nohelpoption' -Log Command line specification does not define typespec for option 'noregexoption' -Return false -Return true -Return true diff --git a/library/commandline/testsuite/tests/cmdmap4.rb b/library/commandline/testsuite/tests/cmdmap4.rb deleted file mode 100644 index 83237165a..000000000 --- a/library/commandline/testsuite/tests/cmdmap4.rb +++ /dev/null @@ -1,75 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: cmpmap4.ycp -# Package: yast2 -# Summary: sanity validation of the command line map -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Cmdmap4Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # map must define help for each option - # map must contain typespec for types "regex" and "enum" - TEST(lambda do - CommandLine.Init( - { - "id" => "testsuite", - "help" => "help is there", - "options" => { - "nohelpoption" => { "type" => "string" }, - "noregexoption" => { "help" => "some help", "type" => "regex" }, - "noenumpoption" => { "help" => "some help", "type" => "enum" }, - "okregexoption" => { - "help" => "some help", - "type" => "regex", - "typespec" => "^[a]+$" - }, - "okenumoption" => { - "help" => "some help", - "type" => "enum", - "typespec" => ["a", "b"] - } - } - }, - [] - ) - end, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Cmdmap4Client.new.main diff --git a/library/commandline/testsuite/tests/cmdmap5.err b/library/commandline/testsuite/tests/cmdmap5.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/cmdmap5.out b/library/commandline/testsuite/tests/cmdmap5.out deleted file mode 100644 index b7e322032..000000000 --- a/library/commandline/testsuite/tests/cmdmap5.out +++ /dev/null @@ -1,7 +0,0 @@ -Log Command line specification maps undefined option 'wrongoption' for action 'okaction' -Log Command line specification maps undefined action 'unknownaction' -Log Command line specification maps undefined option 'unknownoption' for action 'unknownaction' -Log Command line specification maps undefined action 'wrongaction' -Return false -Return true -Return true diff --git a/library/commandline/testsuite/tests/cmdmap5.rb b/library/commandline/testsuite/tests/cmdmap5.rb deleted file mode 100644 index cdcf6654e..000000000 --- a/library/commandline/testsuite/tests/cmdmap5.rb +++ /dev/null @@ -1,77 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: cmpmap5.ycp -# Package: yast2 -# Summary: sanity validation of the command line map -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Cmdmap5Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # mappings must refer to specified actions - # mappings must refer to specified options - TEST(lambda do - CommandLine.Init( - { - "id" => "testsuite", - "help" => "help is there", - "options" => { - "okregexoption" => { - "help" => "some help", - "type" => "regex", - "typespec" => "^[a]+$" - } - }, - "actions" => { - "okaction" => { "help" => "blabla" }, - "okaction2" => { "help" => "blabla" } - }, - "mappings" => { - "unknownaction" => ["unknownoption"], - "wrongaction" => ["okregexoption"], - "okaction" => ["wrongoption"], - "okaction2" => ["okregexoption"] - } - }, - [] - ) - end, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Cmdmap5Client.new.main diff --git a/library/commandline/testsuite/tests/cmdmap6.err b/library/commandline/testsuite/tests/cmdmap6.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/cmdmap6.out b/library/commandline/testsuite/tests/cmdmap6.out deleted file mode 100644 index cc54985d0..000000000 --- a/library/commandline/testsuite/tests/cmdmap6.out +++ /dev/null @@ -1,5 +0,0 @@ -Return true -Return false -Return false -Dump $["actions":$["add":$["help":"add a network card"], "delete":$["help":"delete a network card"], "list":$["example":"lan list configured", "help":"display configuration summary", "options":["non_strict"]]], "finish":, "guihandler":, "help":"Configuration of network cards", "id":"lan", "initialize":, "mappings":$["add":["device", "ip", "netmask", "blem", "atboot"], "delete":["device"], "list":["configured", "unconfigured"]], "options":$["atboot":$["help":"turning on the device at boot", "type":"enum", "typespec":["yes", "no"]], "blem":$["help":"other argument (without spaces and '1')", "type":"regex", "typespec":"^[^ 1]+$"], "configured":$["help":"list only configured cards", "type":""], "device":$["example":"lan add device=eth0", "help":"device ID", "type":"string"], "ip":$["help":"device address", "type":"ip"], "netmask":$["help":"network mask", "type":"netmask"], "propose":$["example":"lan add propose", "help":"propose a configuration", "type":""], "unconfigured":$["help":"list only not configured cards", "type":""]]] -Dump $["actions":$["abort":$["help":"Abort interactive mode without saving the changes"], "add":$["help":"add a network card"], "delete":$["help":"delete a network card"], "exit":$["help":"Exit interactive mode and save the changes"], "help":$["help":"Print the help for this module"], "interactive":$["help":"Start interactive shell to control the module"], "list":$["example":"lan list configured", "help":"display configuration summary", "options":["non_strict"]], "longhelp":$["help":"Print a long version of help for this module"], "xmlhelp":$["help":"Print a long version of help for this module in XML format"]], "mappings":$["abort":["help"], "add":["device", "ip", "netmask", "blem", "atboot", "help", "verbose"], "delete":["device", "help", "verbose"], "exit":["help"], "help":["help", "verbose"], "interactive":["help", "verbose"], "list":["configured", "unconfigured", "help", "verbose"], "xmlhelp":["help", "verbose", "xmlfile"]], "options":$["atboot":$["help":"turning on the device at boot", "type":"enum", "typespec":["yes", "no"]], "blem":$["help":"other argument (without spaces and '1')", "type":"regex", "typespec":"^[^ 1]+$"], "configured":$["help":"list only configured cards", "type":""], "device":$["example":"lan add device=eth0", "help":"device ID", "type":"string"], "help":$["help":"Print the help for this command"], "ip":$["help":"device address", "type":"ip"], "netmask":$["help":"network mask", "type":"netmask"], "propose":$["example":"lan add propose", "help":"propose a configuration", "type":""], "unconfigured":$["help":"list only not configured cards", "type":""], "verbose":$["help":"Show progress information"], "xmlfile":$["help":"Where to store the XML output", "type":"string"]]] diff --git a/library/commandline/testsuite/tests/cmdmap6.rb b/library/commandline/testsuite/tests/cmdmap6.rb deleted file mode 100644 index 32a4effeb..000000000 --- a/library/commandline/testsuite/tests/cmdmap6.rb +++ /dev/null @@ -1,57 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: cmpmap6.ycp -# Package: yast2 -# Summary: sanity validation of the command line map -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Cmdmap6Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # test of the resulting maps - TEST(->() { CommandLine.Init(@cmdline, []) }, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - DUMP(CommandLine.modulecommands) - - DUMP(CommandLine.allcommands) - - # EOF - - nil - end - end -end - -Yast::Cmdmap6Client.new.main diff --git a/library/commandline/testsuite/tests/command1.err b/library/commandline/testsuite/tests/command1.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/command1.out b/library/commandline/testsuite/tests/command1.out deleted file mode 100644 index d9b7a8bf0..000000000 --- a/library/commandline/testsuite/tests/command1.out +++ /dev/null @@ -1,3 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Return true -Return $["command":"add", "options":$["device":"eth0"]] diff --git a/library/commandline/testsuite/tests/command1.rb b/library/commandline/testsuite/tests/command1.rb deleted file mode 100644 index 58c288d4b..000000000 --- a/library/commandline/testsuite/tests/command1.rb +++ /dev/null @@ -1,51 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: command1.ycp -# Package: yast2 -# Summary: test command-line parsing -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Command1Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # everything OK - TEST(->() { CommandLine.Init(@cmdline, ["add", "device=eth0"]) }, [], nil) - TEST(->() { CommandLine.Command }, [], nil) - # EOF - - nil - end - end -end - -Yast::Command1Client.new.main diff --git a/library/commandline/testsuite/tests/command2.err b/library/commandline/testsuite/tests/command2.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/command2.out b/library/commandline/testsuite/tests/command2.out deleted file mode 100644 index c64b8582f..000000000 --- a/library/commandline/testsuite/tests/command2.out +++ /dev/null @@ -1,4 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Write .dev.tty.stderr "Option 'device' is missing value." true -Return false -Return $["command":"abort"] diff --git a/library/commandline/testsuite/tests/command2.rb b/library/commandline/testsuite/tests/command2.rb deleted file mode 100644 index 0355d9be1..000000000 --- a/library/commandline/testsuite/tests/command2.rb +++ /dev/null @@ -1,51 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: command2.ycp -# Package: yast2 -# Summary: test command-line parsing -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Command2Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # option without value - TEST(->() { CommandLine.Init(@cmdline, ["add", "device="]) }, [], nil) - TEST(->() { CommandLine.Command }, [], nil) - # EOF - - nil - end - end -end - -Yast::Command2Client.new.main diff --git a/library/commandline/testsuite/tests/command3.err b/library/commandline/testsuite/tests/command3.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/command3.out b/library/commandline/testsuite/tests/command3.out deleted file mode 100644 index f0a682369..000000000 --- a/library/commandline/testsuite/tests/command3.out +++ /dev/null @@ -1,5 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Write .dev.tty.stderr "Invalid value for option 'device' -- expected 'string', received " true -Write .dev.tty.stderr "Use 'yast2 lan add help' for a complete list of available options." true -Return false -Return $["command":"abort"] diff --git a/library/commandline/testsuite/tests/command3.rb b/library/commandline/testsuite/tests/command3.rb deleted file mode 100644 index 8df4637cc..000000000 --- a/library/commandline/testsuite/tests/command3.rb +++ /dev/null @@ -1,51 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: command4.ycp -# Package: yast2 -# Summary: test command-line parsing -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Command3Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # option requires value - TEST(->() { CommandLine.Init(@cmdline, ["add", "device"]) }, [], nil) - TEST(->() { CommandLine.Command }, [], nil) - # EOF - - nil - end - end -end - -Yast::Command3Client.new.main diff --git a/library/commandline/testsuite/tests/command4.err b/library/commandline/testsuite/tests/command4.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/command4.out b/library/commandline/testsuite/tests/command4.out deleted file mode 100644 index 1f6094e1d..000000000 --- a/library/commandline/testsuite/tests/command4.out +++ /dev/null @@ -1,5 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Write .dev.tty.stderr "Unknown option for command 'add': dev" true -Write .dev.tty.stderr "Use 'yast2 lan add help' for a complete list of available options." true -Return false -Return $["command":"abort"] diff --git a/library/commandline/testsuite/tests/command4.rb b/library/commandline/testsuite/tests/command4.rb deleted file mode 100644 index dff5fca60..000000000 --- a/library/commandline/testsuite/tests/command4.rb +++ /dev/null @@ -1,51 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: command4.ycp -# Package: yast2 -# Summary: test command-line parsing -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Command4Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # unknown option - TEST(->() { CommandLine.Init(@cmdline, ["add", "dev"]) }, [], nil) - TEST(->() { CommandLine.Command }, [], nil) - # EOF - - nil - end - end -end - -Yast::Command4Client.new.main diff --git a/library/commandline/testsuite/tests/command5.err b/library/commandline/testsuite/tests/command5.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/command5.out b/library/commandline/testsuite/tests/command5.out deleted file mode 100644 index 84757bf04..000000000 --- a/library/commandline/testsuite/tests/command5.out +++ /dev/null @@ -1,5 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Write .dev.tty.stderr "Invalid value for option 'ip' -- expected 'ip', received 10.20.a.b" true -Write .dev.tty.stderr "Use 'yast2 lan add help' for a complete list of available options." true -Return false -Return $["command":"abort"] diff --git a/library/commandline/testsuite/tests/command5.rb b/library/commandline/testsuite/tests/command5.rb deleted file mode 100644 index 046f41aa9..000000000 --- a/library/commandline/testsuite/tests/command5.rb +++ /dev/null @@ -1,51 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: command5.ycp -# Package: yast2 -# Summary: test command-line parsing -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Command5Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "CommandLine" - - # unknown option - TEST(->() { CommandLine.Init(@cmdline, ["add", "ip=10.20.a.b"]) }, [], nil) - TEST(->() { CommandLine.Command }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Command5Client.new.main diff --git a/library/commandline/testsuite/tests/command6.err b/library/commandline/testsuite/tests/command6.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/command6.out b/library/commandline/testsuite/tests/command6.out deleted file mode 100644 index 53c3c1ba6..000000000 --- a/library/commandline/testsuite/tests/command6.out +++ /dev/null @@ -1,3 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Return true -Return $["command":"list", "options":$["eth0":""]] diff --git a/library/commandline/testsuite/tests/command6.rb b/library/commandline/testsuite/tests/command6.rb deleted file mode 100644 index 592e4327d..000000000 --- a/library/commandline/testsuite/tests/command6.rb +++ /dev/null @@ -1,51 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: command6.ycp -# Package: yast2 -# Summary: test command-line parsing for non-strict actions -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Command6Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "CommandLine" - - # list is non-strict, so any parameter can be passed to it - TEST(->() { CommandLine.Init(@cmdline, ["list", "eth0"]) }, [], nil) - TEST(->() { CommandLine.Command }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Command6Client.new.main diff --git a/library/commandline/testsuite/tests/command7.err b/library/commandline/testsuite/tests/command7.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/command7.out b/library/commandline/testsuite/tests/command7.out deleted file mode 100644 index 23c2e654a..000000000 --- a/library/commandline/testsuite/tests/command7.out +++ /dev/null @@ -1,6 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Log Type specification for option 'configured' is missing, cannot assign a value to the option -Write .dev.tty.stderr "Option 'configured' cannot have a value. Given value: 1" true -Write .dev.tty.stderr "Use 'yast2 lan list help' for a complete list of available options." true -Return false -Return $["command":"abort"] diff --git a/library/commandline/testsuite/tests/command7.rb b/library/commandline/testsuite/tests/command7.rb deleted file mode 100644 index b955c012c..000000000 --- a/library/commandline/testsuite/tests/command7.rb +++ /dev/null @@ -1,52 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: command6.ycp -# Package: yast2 -# Summary: test command-line parsing for non-strict actions -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Command7Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "CommandLine" - - # list is non-strict, so any parameter can be passed to it, but known are checked, - # so configured is incorrect here - TEST(->() { CommandLine.Init(@cmdline, ["list", "eth0", "configured=1"]) }, [], nil) - TEST(->() { CommandLine.Command }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Command7Client.new.main diff --git a/library/commandline/testsuite/tests/help.err b/library/commandline/testsuite/tests/help.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/help.out b/library/commandline/testsuite/tests/help.out deleted file mode 100644 index 764cc95f5..000000000 --- a/library/commandline/testsuite/tests/help.out +++ /dev/null @@ -1,19 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Write .dev.tty.stderr "\nYaST Configuration Module lan\n------------------------------\n" true -Write .dev.tty.stderr "Configuration of network cards\n" true -Write .dev.tty.stderr "Basic Syntax:" true -Write .dev.tty.stderr " yast2 lan interactive" true -Write .dev.tty.stderr " yast2 lan [verbose] [options]" true -Write .dev.tty.stderr " yast2 lan help" true -Write .dev.tty.stderr " yast2 lan longhelp" true -Write .dev.tty.stderr " yast2 lan xmlhelp" true -Write .dev.tty.stderr " yast2 lan help" true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Commands:" true -Write .dev.tty.stderr " add add a network card" true -Write .dev.tty.stderr " delete delete a network card" true -Write .dev.tty.stderr " list display configuration summary" true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Run 'yast2 lan help' for a list of available options." true -Write .dev.tty.stderr "" true -Return false diff --git a/library/commandline/testsuite/tests/help.rb b/library/commandline/testsuite/tests/help.rb deleted file mode 100644 index 3029ab74d..000000000 --- a/library/commandline/testsuite/tests/help.rb +++ /dev/null @@ -1,51 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: help.ycp -# Package: yast2 -# Summary: print help test -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class HelpClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # test of the resulting maps - TEST(->() { CommandLine.Init(@cmdline, ["help"]) }, [], nil) - - # EOF - - nil - end - end -end - -Yast::HelpClient.new.main diff --git a/library/commandline/testsuite/tests/help1.err b/library/commandline/testsuite/tests/help1.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/help1.out b/library/commandline/testsuite/tests/help1.out deleted file mode 100644 index 18438a386..000000000 --- a/library/commandline/testsuite/tests/help1.out +++ /dev/null @@ -1,15 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Write .dev.tty.stderr "\nYaST Configuration Module lan\n------------------------------\n" true -Write .dev.tty.stderr "Command 'add'" true -Write .dev.tty.stderr " add a network card" true -Write .dev.tty.stderr "\n Options:" true -Write .dev.tty.stderr " device [string] device ID" true -Write .dev.tty.stderr " ip [ip] device address" true -Write .dev.tty.stderr " netmask [netmask] network mask" true -Write .dev.tty.stderr " blem other argument (without spaces and '1')" true -Write .dev.tty.stderr " atboot [ yes no ] turning on the device at boot" true -Write .dev.tty.stderr " help Print the help for this command" true -Write .dev.tty.stderr " verbose Show progress information" true -Write .dev.tty.stderr "\n Options of the [string] type must be written in the form 'option=value'." true -Write .dev.tty.stderr "" true -Return false diff --git a/library/commandline/testsuite/tests/help1.rb b/library/commandline/testsuite/tests/help1.rb deleted file mode 100644 index d03e75cf2..000000000 --- a/library/commandline/testsuite/tests/help1.rb +++ /dev/null @@ -1,51 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: help1.ycp -# Package: yast2 -# Summary: print action help test -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Help1Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # test of the resulting maps - TEST(->() { CommandLine.Init(@cmdline, ["add", "help"]) }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Help1Client.new.main diff --git a/library/commandline/testsuite/tests/interactive1.err b/library/commandline/testsuite/tests/interactive1.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/interactive1.out b/library/commandline/testsuite/tests/interactive1.out deleted file mode 100644 index b8d761e22..000000000 --- a/library/commandline/testsuite/tests/interactive1.out +++ /dev/null @@ -1,4 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Return true -Return false -Return false diff --git a/library/commandline/testsuite/tests/interactive1.rb b/library/commandline/testsuite/tests/interactive1.rb deleted file mode 100644 index 0bbda06dc..000000000 --- a/library/commandline/testsuite/tests/interactive1.rb +++ /dev/null @@ -1,50 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: interactive1.ycp -# Package: yast2 -# Summary: test starting of interactive mode -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Interactive1Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "CommandLine" - - TEST(->() { CommandLine.Init(@cmdline, ["interactive"]) }, [], nil) - TEST(->() { CommandLine.StartGUI }, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - # EOF - - nil - end - end -end - -Yast::Interactive1Client.new.main diff --git a/library/commandline/testsuite/tests/interactive2.err b/library/commandline/testsuite/tests/interactive2.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/interactive2.out b/library/commandline/testsuite/tests/interactive2.out deleted file mode 100644 index 7b21f5f15..000000000 --- a/library/commandline/testsuite/tests/interactive2.out +++ /dev/null @@ -1,8 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Return true -Return false -Return false -Read .dev.tty "exit" -Return $["command":"exit"] -Return true -Return false diff --git a/library/commandline/testsuite/tests/interactive2.rb b/library/commandline/testsuite/tests/interactive2.rb deleted file mode 100644 index 7c4921a2d..000000000 --- a/library/commandline/testsuite/tests/interactive2.rb +++ /dev/null @@ -1,55 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: interactive2.ycp -# Package: yast2 -# Summary: test "exit" in interactive mode -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Interactive2Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "CommandLine" - - TEST(->() { CommandLine.Init(@cmdline, ["interactive"]) }, [], nil) - TEST(->() { CommandLine.StartGUI }, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - - TEST(->() { CommandLine.Command }, [{ "dev" => { "tty" => "exit" } }], nil) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Interactive2Client.new.main diff --git a/library/commandline/testsuite/tests/interactive3.err b/library/commandline/testsuite/tests/interactive3.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/interactive3.out b/library/commandline/testsuite/tests/interactive3.out deleted file mode 100644 index 2cad46b65..000000000 --- a/library/commandline/testsuite/tests/interactive3.out +++ /dev/null @@ -1,8 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Return true -Return false -Return false -Read .dev.tty "abort" -Return $["command":"abort"] -Return true -Return true diff --git a/library/commandline/testsuite/tests/interactive3.rb b/library/commandline/testsuite/tests/interactive3.rb deleted file mode 100644 index 65c9e3e6c..000000000 --- a/library/commandline/testsuite/tests/interactive3.rb +++ /dev/null @@ -1,55 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: interactive3.ycp -# Package: yast2 -# Summary: test "quit" in interactive mode -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Interactive3Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "CommandLine" - - TEST(->() { CommandLine.Init(@cmdline, ["interactive"]) }, [], nil) - TEST(->() { CommandLine.StartGUI }, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - - TEST(->() { CommandLine.Command }, [{ "dev" => { "tty" => "abort" } }], nil) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Interactive3Client.new.main diff --git a/library/commandline/testsuite/tests/interactive4.err b/library/commandline/testsuite/tests/interactive4.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/interactive4.out b/library/commandline/testsuite/tests/interactive4.out deleted file mode 100644 index 978e51afe..000000000 --- a/library/commandline/testsuite/tests/interactive4.out +++ /dev/null @@ -1,12 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Return true -Return false -Return false -Read .dev.tty "add device=eth0" -Return $["command":"add", "options":$["device":"eth0"]] -Return false -Return false -Read .dev.tty "abort" -Return $["command":"abort"] -Return true -Return true diff --git a/library/commandline/testsuite/tests/interactive4.rb b/library/commandline/testsuite/tests/interactive4.rb deleted file mode 100644 index d9fce3d69..000000000 --- a/library/commandline/testsuite/tests/interactive4.rb +++ /dev/null @@ -1,65 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: interactive4.ycp -# Package: yast2 -# Summary: test action in interactive mode -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Interactive4Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "CommandLine" - - # startup - TEST(->() { CommandLine.Init(@cmdline, ["interactive"]) }, [], nil) - TEST(->() { CommandLine.StartGUI }, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - - # do help - TEST(->() { CommandLine.Command }, - [ - { "dev" => { "tty" => "add device=eth0" } } - ], nil) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - # quit - TEST(->() { CommandLine.Command }, [{ "dev" => { "tty" => "abort" } }], nil) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Interactive4Client.new.main diff --git a/library/commandline/testsuite/tests/interactive5.err b/library/commandline/testsuite/tests/interactive5.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/interactive5.out b/library/commandline/testsuite/tests/interactive5.out deleted file mode 100644 index 92bb4f5ab..000000000 --- a/library/commandline/testsuite/tests/interactive5.out +++ /dev/null @@ -1,26 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Return true -Return false -Return false -Read .dev.tty "help" -Write .dev.tty "\nYaST Configuration Module lan\n------------------------------\n" true -Write .dev.tty "Configuration of network cards\n" true -Write .dev.tty "Basic Syntax:" true -Write .dev.tty " [options]" true -Write .dev.tty " help" true -Write .dev.tty " help" true -Write .dev.tty " longhelp" true -Write .dev.tty " xmlhelp" true -Write .dev.tty "" true -Write .dev.tty " exit" true -Write .dev.tty " abort" true -Write .dev.tty "" true -Write .dev.tty "Commands:" true -Write .dev.tty " add add a network card" true -Write .dev.tty " delete delete a network card" true -Write .dev.tty " list display configuration summary" true -Write .dev.tty "" true -Read .dev.tty "abort" -Return $["command":"abort"] -Return true -Return true diff --git a/library/commandline/testsuite/tests/interactive5.rb b/library/commandline/testsuite/tests/interactive5.rb deleted file mode 100644 index 87f372208..000000000 --- a/library/commandline/testsuite/tests/interactive5.rb +++ /dev/null @@ -1,61 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: interactive5.ycp -# Package: yast2 -# Summary: test help in interactive mode -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Interactive5Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "CommandLine" - - # startup - TEST(->() { CommandLine.Init(@cmdline, ["interactive"]) }, [], nil) - TEST(->() { CommandLine.StartGUI }, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - - # do help - TEST( - ->() { CommandLine.Command }, - [[{ "dev" => { "tty" => "help" } }, { "dev" => { "tty" => "abort" } }]], - nil - ) - TEST(->() { CommandLine.Done }, [], nil) - TEST(->() { CommandLine.Aborted }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Interactive5Client.new.main diff --git a/library/commandline/testsuite/tests/longhelp.err b/library/commandline/testsuite/tests/longhelp.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/longhelp.out b/library/commandline/testsuite/tests/longhelp.out deleted file mode 100644 index 85c77f222..000000000 --- a/library/commandline/testsuite/tests/longhelp.out +++ /dev/null @@ -1,82 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Write .dev.tty.stderr "\nYaST Configuration Module lan\n------------------------------\n" true -Write .dev.tty.stderr "Configuration of network cards\n" true -Write .dev.tty.stderr "Basic Syntax:" true -Write .dev.tty.stderr " yast2 lan interactive" true -Write .dev.tty.stderr " yast2 lan [verbose] [options]" true -Write .dev.tty.stderr " yast2 lan help" true -Write .dev.tty.stderr " yast2 lan longhelp" true -Write .dev.tty.stderr " yast2 lan xmlhelp" true -Write .dev.tty.stderr " yast2 lan help" true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Commands:" true -Write .dev.tty.stderr " add add a network card" true -Write .dev.tty.stderr " delete delete a network card" true -Write .dev.tty.stderr " list display configuration summary" true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Run 'yast2 lan help' for a list of available options." true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Command 'abort'" true -Write .dev.tty.stderr " Abort interactive mode without saving the changes" true -Write .dev.tty.stderr "\n Options:" true -Write .dev.tty.stderr " help Print the help for this command" true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Command 'add'" true -Write .dev.tty.stderr " add a network card" true -Write .dev.tty.stderr "\n Options:" true -Write .dev.tty.stderr " device [string] device ID" true -Write .dev.tty.stderr " ip [ip] device address" true -Write .dev.tty.stderr " netmask [netmask] network mask" true -Write .dev.tty.stderr " blem other argument (without spaces and '1')" true -Write .dev.tty.stderr " atboot [ yes no ] turning on the device at boot" true -Write .dev.tty.stderr " help Print the help for this command" true -Write .dev.tty.stderr " verbose Show progress information" true -Write .dev.tty.stderr "\n Options of the [string] type must be written in the form 'option=value'." true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Command 'delete'" true -Write .dev.tty.stderr " delete a network card" true -Write .dev.tty.stderr "\n Options:" true -Write .dev.tty.stderr " device [string] device ID" true -Write .dev.tty.stderr " help Print the help for this command" true -Write .dev.tty.stderr " verbose Show progress information" true -Write .dev.tty.stderr "\n Options of the [string] type must be written in the form 'option=value'." true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Command 'exit'" true -Write .dev.tty.stderr " Exit interactive mode and save the changes" true -Write .dev.tty.stderr "\n Options:" true -Write .dev.tty.stderr " help Print the help for this command" true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Command 'help'" true -Write .dev.tty.stderr " Print the help for this module" true -Write .dev.tty.stderr "\n Options:" true -Write .dev.tty.stderr " help Print the help for this command" true -Write .dev.tty.stderr " verbose Show progress information" true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Command 'interactive'" true -Write .dev.tty.stderr " Start interactive shell to control the module" true -Write .dev.tty.stderr "\n Options:" true -Write .dev.tty.stderr " help Print the help for this command" true -Write .dev.tty.stderr " verbose Show progress information" true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Command 'list'" true -Write .dev.tty.stderr " display configuration summary" true -Write .dev.tty.stderr "\n Options:" true -Write .dev.tty.stderr " configured list only configured cards" true -Write .dev.tty.stderr " unconfigured list only not configured cards" true -Write .dev.tty.stderr " help Print the help for this command" true -Write .dev.tty.stderr " verbose Show progress information" true -Write .dev.tty.stderr "\n Example:" true -Write .dev.tty.stderr " lan list configured" true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Command 'longhelp'" true -Write .dev.tty.stderr " Print a long version of help for this module" true -Write .dev.tty.stderr "" true -Write .dev.tty.stderr "Command 'xmlhelp'" true -Write .dev.tty.stderr " Print a long version of help for this module in XML format" true -Write .dev.tty.stderr "\n Options:" true -Write .dev.tty.stderr " help Print the help for this command" true -Write .dev.tty.stderr " verbose Show progress information" true -Write .dev.tty.stderr " xmlfile [string] Where to store the XML output" true -Write .dev.tty.stderr "\n Options of the [string] type must be written in the form 'option=value'." true -Write .dev.tty.stderr "" true -Return false diff --git a/library/commandline/testsuite/tests/longhelp.rb b/library/commandline/testsuite/tests/longhelp.rb deleted file mode 100644 index 5569a91dc..000000000 --- a/library/commandline/testsuite/tests/longhelp.rb +++ /dev/null @@ -1,51 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: longhelp.ycp -# Package: yast2 -# Summary: print longhelp test -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class LonghelpClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # test of the resulting maps - TEST(->() { CommandLine.Init(@cmdline, ["longhelp"]) }, [], nil) - - # EOF - - nil - end - end -end - -Yast::LonghelpClient.new.main diff --git a/library/commandline/testsuite/tests/startgui1.err b/library/commandline/testsuite/tests/startgui1.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/startgui1.out b/library/commandline/testsuite/tests/startgui1.out deleted file mode 100644 index 176c26b1d..000000000 --- a/library/commandline/testsuite/tests/startgui1.out +++ /dev/null @@ -1,3 +0,0 @@ -Return true -Return true -Return false diff --git a/library/commandline/testsuite/tests/startgui1.rb b/library/commandline/testsuite/tests/startgui1.rb deleted file mode 100644 index fa3d7025c..000000000 --- a/library/commandline/testsuite/tests/startgui1.rb +++ /dev/null @@ -1,53 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: startgui1.ycp -# Package: yast2 -# Summary: test StartGUI() and Done() -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Startgui1Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # should be successfull - TEST(->() { CommandLine.Init(@cmdline, []) }, [], nil) - TEST(->() { CommandLine.StartGUI }, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Startgui1Client.new.main diff --git a/library/commandline/testsuite/tests/startgui2.err b/library/commandline/testsuite/tests/startgui2.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/startgui2.out b/library/commandline/testsuite/tests/startgui2.out deleted file mode 100644 index b8d761e22..000000000 --- a/library/commandline/testsuite/tests/startgui2.out +++ /dev/null @@ -1,4 +0,0 @@ -Write .dev.tty.prompt "YaST2 lan> " true -Return true -Return false -Return false diff --git a/library/commandline/testsuite/tests/startgui2.rb b/library/commandline/testsuite/tests/startgui2.rb deleted file mode 100644 index 58e6d1819..000000000 --- a/library/commandline/testsuite/tests/startgui2.rb +++ /dev/null @@ -1,53 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: startgui2.ycp -# Package: yast2 -# Summary: test StartGUI() and Done() -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Testsuite.ycp -module Yast - class Startgui2Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.include self, "testsuitedata.rb" - - Yast.import "TypeRepository" - Yast.import "CommandLine" - - # should not be successfull - TEST(->() { CommandLine.Init(@cmdline, ["add"]) }, [], nil) - TEST(->() { CommandLine.StartGUI }, [], nil) - TEST(->() { CommandLine.Done }, [], nil) - - # EOF - - nil - end - end -end - -Yast::Startgui2Client.new.main diff --git a/library/commandline/testsuite/tests/testsuitedata.rb b/library/commandline/testsuite/tests/testsuitedata.rb deleted file mode 100644 index 68dcf195d..000000000 --- a/library/commandline/testsuite/tests/testsuitedata.rb +++ /dev/null @@ -1,87 +0,0 @@ -# encoding: utf-8 - -# File: XXXXXX -# Package: yast2 -# Summary: XXXXXX -# Author: Stanislav Visnovsky -# -# $Id$ -module Yast - module TestsuitedataInclude - def initialize_testsuitedata(_include_target) - Yast.import "CommandLine" - - @cmdline = { - "help" => "Configuration of network cards", - "id" => "lan", - "initialize" => fun_ref(method(:init), "void ()"), - "finish" => fun_ref(method(:finish), "void ()"), - "guihandler" => fun_ref(method(:GUI), "void ()"), - "actions" => { - "list" => { - "help" => "display configuration summary", - "example" => "lan list configured", - "options" => ["non_strict"] - }, - "add" => { "help" => "add a network card" }, - "delete" => { "help" => "delete a network card" } - }, - "options" => { - "propose" => { - "help" => "propose a configuration", - "example" => "lan add propose", - "type" => "" - }, - "configured" => { - "help" => "list only configured cards", - "type" => "" - }, - "unconfigured" => { - "help" => "list only not configured cards", - "type" => "" - }, - "device" => { - "help" => "device ID", - "type" => "string", - "example" => "lan add device=eth0" - }, - "ip" => { "help" => "device address", "type" => "ip" }, - "netmask" => { "help" => "network mask", "type" => "netmask" }, - "blem" => { - "help" => "other argument (without spaces and '1')", - "type" => "regex", - "typespec" => "^[^ 1]+$" - }, - "atboot" => { - "help" => "turning on the device at boot", - "type" => "enum", - "typespec" => ["yes", "no"] - } - }, - "mappings" => { - "list" => ["configured", "unconfigured"], - "add" => ["device", "ip", "netmask", "blem", "atboot"], - "delete" => ["device"] - } - } - end - - def init - CommandLine.Print("Initialization") - - nil - end - - def finish - CommandLine.Print("Finish") - - nil - end - - def GUI - CommandLine.Print("GUI") - - nil - end - end -end diff --git a/library/commandline/testsuite/tests/unique1.err b/library/commandline/testsuite/tests/unique1.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/commandline/testsuite/tests/unique1.out b/library/commandline/testsuite/tests/unique1.out deleted file mode 100644 index b08742b37..000000000 --- a/library/commandline/testsuite/tests/unique1.out +++ /dev/null @@ -1,3 +0,0 @@ -Log Specify only one of the commands: 'add', or 'delete'. -Return nil -Return add diff --git a/library/commandline/testsuite/tests/unique1.rb b/library/commandline/testsuite/tests/unique1.rb deleted file mode 100644 index a8e30f7bf..000000000 --- a/library/commandline/testsuite/tests/unique1.rb +++ /dev/null @@ -1,65 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: unique1.ycp -# Package: yast2 -# Summary: check uniqueness of an option -# Author: Stanislav Visnovsky -# -# $Id$ -# -# testedfiles: CommandLine.ycp Report.ycp Testsuite.ycp -module Yast - class Unique1Client < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "TypeRepository" - Yast.import "CommandLine" - Yast.import "Report" - - # disable use of UI - Report.Import("errors" => { "show" => false, "log" => true }) - - # fail: add and delete are mutually exclusive - TEST(lambda do - CommandLine.UniqueOption( - { "add" => "", "delete" => "" }, - ["add", "delete"] - ) - end, [], nil) - # pass - TEST(lambda do - CommandLine.UniqueOption( - { "add" => "", "share" => "" }, - ["add", "delete"] - ) - end, [], nil) - - # EOF - - nil - end - end -end - -Yast::Unique1Client.new.main diff --git a/library/control/Makefile.am b/library/control/Makefile.am deleted file mode 100644 index 554fbb9a1..000000000 --- a/library/control/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# -# Makefile.am for xml/module -# - -SUBDIRS = src test testsuite diff --git a/library/control/src/Makefile.am b/library/control/src/Makefile.am deleted file mode 100644 index d84f2ca08..000000000 --- a/library/control/src/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/Installation.rb \ - modules/InstExtensionImage.rb \ - modules/AutoinstData.rb \ - modules/GetInstArgs.rb \ - modules/InstError.rb \ - modules/ProductControl.rb \ - modules/ProductFeatures.rb \ - modules/ProductProfile.rb \ - modules/WorkflowManager.rb - -EXTRA_DIST = $(module_DATA) - -include $(top_srcdir)/Makefile.am.common diff --git a/library/control/test/Makefile.am b/library/control/test/Makefile.am deleted file mode 100644 index 2bdf35d8d..000000000 --- a/library/control/test/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -TESTS = \ - InstExtensionImage_test.rb \ - installation_test.rb \ - ProductFeatures_test.rb \ - workflow_manager_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS) test_helper.rb diff --git a/library/control/testsuite/Makefile.am b/library/control/testsuite/Makefile.am deleted file mode 100644 index e85fbc827..000000000 --- a/library/control/testsuite/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff --git a/library/control/testsuite/tests/PrepareProposals.err b/library/control/testsuite/tests/PrepareProposals.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/control/testsuite/tests/PrepareProposals.out b/library/control/testsuite/tests/PrepareProposals.out deleted file mode 100644 index ef1acc169..000000000 --- a/library/control/testsuite/tests/PrepareProposals.out +++ /dev/null @@ -1 +0,0 @@ -Return [$["archs":"", "mode":"installation", "name":"initial", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"], "proposal_tabs":[$["label":"Overview", "proposal_modules":["partitions", "software_simple", "language_simple"]], $["label":"Expert", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"]]], "stage":"initial"], $["archs":"", "mode":"demo", "name":"initial", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"], "proposal_tabs":[$["label":"Overview", "proposal_modules":["partitions", "software_simple", "language_simple"]], $["label":"Expert", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"]]], "stage":"initial"], $["archs":"", "mode":"autoinstallation", "name":"initial", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"], "proposal_tabs":[$["label":"Overview", "proposal_modules":["partitions", "software_simple", "language_simple"]], $["label":"Expert", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"]]], "stage":"initial"], $["archs":"", "mode":"", "name":"network", "proposal_modules":[$["name":"lan", "presentation_order":"20"], $["name":"dsl", "presentation_order":"30"], $["name":"isdn", "presentation_order":"40"], $["name":"modem", "presentation_order":"50"], $["name":"remote", "presentation_order":"60"], $["name":"firewall", "presentation_order":"10"], $["name":"proxy", "presentation_order":"70"]], "stage":"continue"], $["archs":"", "mode":"", "name":"network", "proposal_modules":[$["name":"lan", "presentation_order":"20"], $["name":"dsl", "presentation_order":"30"], $["name":"isdn", "presentation_order":"40"], $["name":"modem", "presentation_order":"50"], $["name":"remote", "presentation_order":"60"], $["name":"firewall", "presentation_order":"10"], $["name":"proxy", "presentation_order":"70"]], "stage":"normal"]] diff --git a/library/control/testsuite/tests/PrepareProposals.rb b/library/control/testsuite/tests/PrepareProposals.rb deleted file mode 100644 index 43f5a8060..000000000 --- a/library/control/testsuite/tests/PrepareProposals.rb +++ /dev/null @@ -1,108 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class PrepareProposalsClient < Client - def main - # testedfiles: WorkflowManager.ycp - - Yast.include self, "testsuite.rb" - - @READ = { "target" => { "size" => 0 } } - - @WRITE = {} - - @EXEC = { - "target" => { - "bash_output" => { "exit" => 0, "stdout" => "", "stderr" => "" } - } - } - - TESTSUITE_INIT([@READ, @WRITE, @EXEC], nil) - - Yast.import "WorkflowManager" - - @proposals = [ - { - "mode" => "installation,demo,autoinstallation", - "name" => "initial", - "proposal_modules" => [ - "hwinfo", - "keyboard", - "mouse", - "partitions", - "software", - "bootloader", - "timezone", - "language", - "default_target" - ], - "proposal_tabs" => [ - { - "label" => "Overview", - "proposal_modules" => [ - "partitions", - "software_simple", - "language_simple" - ] - }, - { - "label" => "Expert", - "proposal_modules" => [ - "hwinfo", - "keyboard", - "mouse", - "partitions", - "software", - "bootloader", - "timezone", - "language", - "default_target" - ] - } - ], - "stage" => "initial" - }, - { - "name" => "network", - "proposal_modules" => [ - { "name" => "lan", "presentation_order" => "20" }, - { "name" => "dsl", "presentation_order" => "30" }, - { "name" => "isdn", "presentation_order" => "40" }, - { "name" => "modem", "presentation_order" => "50" }, - { "name" => "remote", "presentation_order" => "60" }, - { "name" => "firewall", "presentation_order" => "10" }, - { "name" => "proxy", "presentation_order" => "70" } - ], - "stage" => "continue,normal" - } - ] - - TEST(->() { WorkflowManager.PrepareProposals(@proposals) }, [], nil) - - nil - end - end -end - -Yast::PrepareProposalsClient.new.main diff --git a/library/control/testsuite/tests/PrepareWorkflows.err b/library/control/testsuite/tests/PrepareWorkflows.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/control/testsuite/tests/PrepareWorkflows.out b/library/control/testsuite/tests/PrepareWorkflows.out deleted file mode 100644 index 55968db27..000000000 --- a/library/control/testsuite/tests/PrepareWorkflows.out +++ /dev/null @@ -1 +0,0 @@ -Return [$["defaults":$["archs":"i386"], "label":"Preparation", "mode":"installation", "modules":[$["arguments":$["first_run":"yes"], "enable_back":"no", "enable_next":"yes", "label":"Language", "name":"language", "retranslate":true], $["label":"Perform Installation", "name":"finish"]], "stage":"initial"], $["defaults":$["archs":"x86_64"], "label":"Preparation", "mode":"installation", "modules":[$["arguments":$["first_run":"yes"], "enable_back":"no", "enable_next":"yes", "label":"Language", "name":"language", "retranslate":true], $["label":"Perform Installation", "name":"finish"]], "stage":"initial"], $["defaults":$["archs":"i386"], "label":"Preparation", "mode":"update", "modules":[$["arguments":$["first_run":"yes"], "enable_back":"no", "enable_next":"yes", "label":"Language", "name":"language", "retranslate":true], $["label":"Perform Installation", "name":"finish"]], "stage":"initial"], $["defaults":$["archs":"x86_64"], "label":"Preparation", "mode":"update", "modules":[$["arguments":$["first_run":"yes"], "enable_back":"no", "enable_next":"yes", "label":"Language", "name":"language", "retranslate":true], $["label":"Perform Installation", "name":"finish"]], "stage":"initial"]] diff --git a/library/control/testsuite/tests/PrepareWorkflows.rb b/library/control/testsuite/tests/PrepareWorkflows.rb deleted file mode 100644 index ef9053c4c..000000000 --- a/library/control/testsuite/tests/PrepareWorkflows.rb +++ /dev/null @@ -1,72 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class PrepareWorkflowsClient < Client - def main - # testedfiles: WorkflowManager.ycp - - Yast.include self, "testsuite.rb" - - @READ = { "target" => { "size" => 0 } } - - @WRITE = {} - - @EXEC = { - "target" => { - "bash_output" => { "exit" => 0, "stdout" => "", "stderr" => "" } - } - } - - TESTSUITE_INIT([@READ, @WRITE, @EXEC], nil) - - Yast.import "WorkflowManager" - - @workflows = [ - { - "defaults" => { "archs" => "i386,x86_64" }, - "label" => "Preparation", - "mode" => "installation,update", - "modules" => [ - { - "arguments" => { "first_run" => "yes" }, - "enable_back" => "no", - "enable_next" => "yes", - "label" => "Language", - "name" => "language", - "retranslate" => true - }, - { "label" => "Perform Installation", "name" => "finish" } - ], - "stage" => "initial" - } - ] - - TEST(->() { WorkflowManager.PrepareWorkflows(@workflows) }, [], nil) - - nil - end - end -end - -Yast::PrepareWorkflowsClient.new.main diff --git a/library/control/testsuite/tests/ProductProfile.err b/library/control/testsuite/tests/ProductProfile.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/control/testsuite/tests/ProductProfile.out b/library/control/testsuite/tests/ProductProfile.out deleted file mode 100644 index ee34e0131..000000000 --- a/library/control/testsuite/tests/ProductProfile.out +++ /dev/null @@ -1,4 +0,0 @@ -Return true -Return $[] -Return true -Return true diff --git a/library/control/testsuite/tests/ProductProfile.rb b/library/control/testsuite/tests/ProductProfile.rb deleted file mode 100644 index 353c9ca77..000000000 --- a/library/control/testsuite/tests/ProductProfile.rb +++ /dev/null @@ -1,53 +0,0 @@ -# encoding: utf-8 - -# ProductProfile.ycp -# Tests of ProductProfile routines -module Yast - class ProductProfileClient < Client - def main - # testedfiles: ProductProfile.ycp - Yast.import "Testsuite" - Yast.import "ProductProfile" - - @READ = { "target" => { "tmpdir" => "/tmp/YaST" } } - @EX = { "target" => { "bash_output" => {} } } - - # just returns true because of non-installation mode - Testsuite.Test(->() { ProductProfile.CheckCompliance(nil) }, - [ - @READ, - {}, - @EX - ], 0) - - Testsuite.Test(->() { ProductProfile.compliance_checked }, [], 0) - - Yast.import "Mode" - Mode.SetMode("installation") - - ProductProfile.compliance_checked = { 1 => true } - - # exits on compliance_checked test - Testsuite.Test(->() { ProductProfile.CheckCompliance(nil) }, - [ - @READ, - {}, - @EX - ], 0) - - Testsuite.Test(->() { ProductProfile.CheckCompliance(1) }, - [ - @READ, - {}, - @EX - ], 0) - - # this would continue to IsCompliant and initialize Pkg:: - # Testsuite::Test (``(ProductProfile::CheckCompliance (2)), [ READ, $[], EX ], 0); - - nil - end - end -end - -Yast::ProductProfileClient.new.main diff --git a/library/control/testsuite/tests/WorkflowManager.err b/library/control/testsuite/tests/WorkflowManager.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/control/testsuite/tests/WorkflowManager.out b/library/control/testsuite/tests/WorkflowManager.out deleted file mode 100644 index 7eea2f8ec..000000000 --- a/library/control/testsuite/tests/WorkflowManager.out +++ /dev/null @@ -1,22 +0,0 @@ -Return nil -Dump -Dump Adding new Add-On product -Return true -Return ["/tmp/additional-control-files/3:__AddOnProduct-ControlFile__.xml"] -Dump -Dump Adding another Add-On product -Return true -Return ["/tmp/additional-control-files/3:__AddOnProduct-ControlFile__.xml", "/tmp/additional-control-files/12:__AddOnProduct-ControlFile__.xml"] -Dump -Dump Removing the first Add-On product -Execute .target.remove "/tmp/additional-control-files/3:__AddOnProduct-ControlFile__.xml" 0 -Return true -Return ["/tmp/additional-control-files/12:__AddOnProduct-ControlFile__.xml"] -Dump -Dump Removing the first Add-On product -Log MD5 sum of file /tmp/additional-control-files/12:__AddOnProduct-ControlFile__.xml is nil -Log Workflow ident is: nil -Return true -Dump -Dump Current Settings -Return $["clone_modules":[], "inst_finish":[], "proposals":[$["archs":"", "mode":"installation", "name":"initial", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"], "proposal_tabs":[$["label":"Overview", "proposal_modules":["partitions", "software_simple", "language_simple"]], $["label":"Expert", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"]]], "stage":"initial"], $["archs":"", "mode":"demo", "name":"initial", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"], "proposal_tabs":[$["label":"Overview", "proposal_modules":["partitions", "software_simple", "language_simple"]], $["label":"Expert", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"]]], "stage":"initial"], $["archs":"", "mode":"autoinstallation", "name":"initial", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"], "proposal_tabs":[$["label":"Overview", "proposal_modules":["partitions", "software_simple", "language_simple"]], $["label":"Expert", "proposal_modules":["hwinfo", "keyboard", "mouse", "partitions", "software", "bootloader", "timezone", "language", "default_target"]]], "stage":"initial"], $["archs":"", "mode":"", "name":"network", "proposal_modules":[$["name":"lan", "presentation_order":"20"], $["name":"dsl", "presentation_order":"30"], $["name":"isdn", "presentation_order":"40"], $["name":"modem", "presentation_order":"50"], $["name":"remote", "presentation_order":"60"], $["name":"firewall", "presentation_order":"10"], $["name":"proxy", "presentation_order":"70"]], "stage":"continue"], $["archs":"", "mode":"", "name":"network", "proposal_modules":[$["name":"lan", "presentation_order":"20"], $["name":"dsl", "presentation_order":"30"], $["name":"isdn", "presentation_order":"40"], $["name":"modem", "presentation_order":"50"], $["name":"remote", "presentation_order":"60"], $["name":"firewall", "presentation_order":"10"], $["name":"proxy", "presentation_order":"70"]], "stage":"normal"]], "system_roles":[], "unmerged_changes":false, "workflows":[$["defaults":$["archs":"i386"], "label":"Preparation", "mode":"installation", "modules":[$["arguments":$["first_run":"yes"], "enable_back":"no", "enable_next":"yes", "label":"Language", "name":"language", "retranslate":true], $["label":"Perform Installation", "name":"finish"]], "stage":"initial"], $["defaults":$["archs":"x86_64"], "label":"Preparation", "mode":"installation", "modules":[$["arguments":$["first_run":"yes"], "enable_back":"no", "enable_next":"yes", "label":"Language", "name":"language", "retranslate":true], $["label":"Perform Installation", "name":"finish"]], "stage":"initial"], $["defaults":$["archs":"i386"], "label":"Preparation", "mode":"update", "modules":[$["arguments":$["first_run":"yes"], "enable_back":"no", "enable_next":"yes", "label":"Language", "name":"language", "retranslate":true], $["label":"Perform Installation", "name":"finish"]], "stage":"initial"], $["defaults":$["archs":"x86_64"], "label":"Preparation", "mode":"update", "modules":[$["arguments":$["first_run":"yes"], "enable_back":"no", "enable_next":"yes", "label":"Language", "name":"language", "retranslate":true], $["label":"Perform Installation", "name":"finish"]], "stage":"initial"]]] diff --git a/library/control/testsuite/tests/WorkflowManager.rb b/library/control/testsuite/tests/WorkflowManager.rb deleted file mode 100644 index 4f538c074..000000000 --- a/library/control/testsuite/tests/WorkflowManager.rb +++ /dev/null @@ -1,305 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class WorkflowManagerClient < Client - def main - # testedfiles: WorkflowManager.ycp - - Yast.include self, "testsuite.rb" - - @READ = { "target" => { "size" => 0, "stat" => { "dummy" => true } } } - - @WRITE = {} - - @EXEC = {} - - @MOCK = [@READ, @WRITE, @EXEC] - - TESTSUITE_INIT(@MOCK, nil) - - Yast.import "WorkflowManager" - Yast.import "ProductControl" - - # init --> - ProductControl.workflows = [ - { - "defaults" => { "archs" => "i386" }, - "label" => "Preparation", - "mode" => "installation", - "modules" => [ - { - "arguments" => { "first_run" => "yes" }, - "enable_back" => "no", - "enable_next" => "yes", - "label" => "Language", - "name" => "language", - "retranslate" => true - }, - { "label" => "Perform Installation", "name" => "finish" } - ], - "stage" => "initial" - }, - { - "defaults" => { "archs" => "x86_64" }, - "label" => "Preparation", - "mode" => "installation", - "modules" => [ - { - "arguments" => { "first_run" => "yes" }, - "enable_back" => "no", - "enable_next" => "yes", - "label" => "Language", - "name" => "language", - "retranslate" => true - }, - { "label" => "Perform Installation", "name" => "finish" } - ], - "stage" => "initial" - }, - { - "defaults" => { "archs" => "i386" }, - "label" => "Preparation", - "mode" => "update", - "modules" => [ - { - "arguments" => { "first_run" => "yes" }, - "enable_back" => "no", - "enable_next" => "yes", - "label" => "Language", - "name" => "language", - "retranslate" => true - }, - { "label" => "Perform Installation", "name" => "finish" } - ], - "stage" => "initial" - }, - { - "defaults" => { "archs" => "x86_64" }, - "label" => "Preparation", - "mode" => "update", - "modules" => [ - { - "arguments" => { "first_run" => "yes" }, - "enable_back" => "no", - "enable_next" => "yes", - "label" => "Language", - "name" => "language", - "retranslate" => true - }, - { "label" => "Perform Installation", "name" => "finish" } - ], - "stage" => "initial" - } - ] - WorkflowManager.PrepareSystemWorkflows - - ProductControl.proposals = [ - { - "archs" => "", - "mode" => "installation", - "name" => "initial", - "proposal_modules" => [ - "hwinfo", - "keyboard", - "mouse", - "partitions", - "software", - "bootloader", - "timezone", - "language", - "default_target" - ], - "proposal_tabs" => [ - { - "label" => "Overview", - "proposal_modules" => [ - "partitions", - "software_simple", - "language_simple" - ] - }, - { - "label" => "Expert", - "proposal_modules" => [ - "hwinfo", - "keyboard", - "mouse", - "partitions", - "software", - "bootloader", - "timezone", - "language", - "default_target" - ] - } - ], - "stage" => "initial" - }, - { - "archs" => "", - "mode" => "demo", - "name" => "initial", - "proposal_modules" => [ - "hwinfo", - "keyboard", - "mouse", - "partitions", - "software", - "bootloader", - "timezone", - "language", - "default_target" - ], - "proposal_tabs" => [ - { - "label" => "Overview", - "proposal_modules" => [ - "partitions", - "software_simple", - "language_simple" - ] - }, - { - "label" => "Expert", - "proposal_modules" => [ - "hwinfo", - "keyboard", - "mouse", - "partitions", - "software", - "bootloader", - "timezone", - "language", - "default_target" - ] - } - ], - "stage" => "initial" - }, - { - "archs" => "", - "mode" => "autoinstallation", - "name" => "initial", - "proposal_modules" => [ - "hwinfo", - "keyboard", - "mouse", - "partitions", - "software", - "bootloader", - "timezone", - "language", - "default_target" - ], - "proposal_tabs" => [ - { - "label" => "Overview", - "proposal_modules" => [ - "partitions", - "software_simple", - "language_simple" - ] - }, - { - "label" => "Expert", - "proposal_modules" => [ - "hwinfo", - "keyboard", - "mouse", - "partitions", - "software", - "bootloader", - "timezone", - "language", - "default_target" - ] - } - ], - "stage" => "initial" - }, - { - "archs" => "", - "mode" => "", - "name" => "network", - "proposal_modules" => [ - { "name" => "lan", "presentation_order" => "20" }, - { "name" => "dsl", "presentation_order" => "30" }, - { "name" => "isdn", "presentation_order" => "40" }, - { "name" => "modem", "presentation_order" => "50" }, - { "name" => "remote", "presentation_order" => "60" }, - { "name" => "firewall", "presentation_order" => "10" }, - { "name" => "proxy", "presentation_order" => "70" } - ], - "stage" => "continue" - }, - { - "archs" => "", - "mode" => "", - "name" => "network", - "proposal_modules" => [ - { "name" => "lan", "presentation_order" => "20" }, - { "name" => "dsl", "presentation_order" => "30" }, - { "name" => "isdn", "presentation_order" => "40" }, - { "name" => "modem", "presentation_order" => "50" }, - { "name" => "remote", "presentation_order" => "60" }, - { "name" => "firewall", "presentation_order" => "10" }, - { "name" => "proxy", "presentation_order" => "70" } - ], - "stage" => "normal" - } - ] - WorkflowManager.PrepareSystemProposals - # init <-- - - TEST(->() { WorkflowManager.SetBaseWorkflow(false) }, @MOCK, nil) - - DUMP("") - DUMP("Adding new Add-On product") - TEST(->() { WorkflowManager.AddWorkflow(:addon, 3, "") }, @MOCK, nil) - TEST(->() { WorkflowManager.GetAllUsedControlFiles }, @MOCK, nil) - - DUMP("") - DUMP("Adding another Add-On product") - TEST(->() { WorkflowManager.AddWorkflow(:addon, 12, "") }, @MOCK, nil) - TEST(->() { WorkflowManager.GetAllUsedControlFiles }, @MOCK, nil) - - DUMP("") - DUMP("Removing the first Add-On product") - TEST(->() { WorkflowManager.RemoveWorkflow(:addon, 3, "") }, @MOCK, nil) - TEST(->() { WorkflowManager.GetAllUsedControlFiles }, @MOCK, nil) - - DUMP("") - DUMP("Removing the first Add-On product") - TEST(->() { WorkflowManager.MergeWorkflows }, @MOCK, nil) - - DUMP("") - DUMP("Current Settings") - TEST(->() { WorkflowManager.DumpCurrentSettings }, @MOCK, nil) - - nil - end - end -end - -Yast::WorkflowManagerClient.new.main diff --git a/library/control/testsuite/tests/restore.err b/library/control/testsuite/tests/restore.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/control/testsuite/tests/restore.out b/library/control/testsuite/tests/restore.out deleted file mode 100644 index f44dd63a2..000000000 --- a/library/control/testsuite/tests/restore.out +++ /dev/null @@ -1,8 +0,0 @@ -Dir .product.features.section: [] -Return expert -Dir .product.features.section: [] -Return yes -Dir .product.features.section: [] -Return true -Dir .product.features.section: [] -Return 95 diff --git a/library/control/testsuite/tests/restore.rb b/library/control/testsuite/tests/restore.rb deleted file mode 100644 index 749d29a68..000000000 --- a/library/control/testsuite/tests/restore.rb +++ /dev/null @@ -1,71 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class RestoreClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "ProductFeatures" - - @READ = { - "product" => { - "features" => { - "USE_DESKTOP_SCHEDULER" => "0", - "ENABLE_AUTOLOGIN" => "yes", - "EVMS_CONFIG" => "0", - "IO_SCHEDULER" => "cfg", - "UI_MODE" => "expert", - "INCOMPLETE_TRANSLATION_TRESHOLD" => "95" - } - } - } - - TEST(->() { ProductFeatures.GetStringFeature("globals", "ui_mode") }, - [ - @READ - ], 0) - TEST(lambda do - ProductFeatures.GetStringFeature("globals", "enable_autologin") - end, [ - @READ - ], 0) - TEST(lambda do - ProductFeatures.GetBooleanFeature("globals", "enable_autologin") - end, [ - @READ - ], 0) - TEST(lambda do - ProductFeatures.GetIntegerFeature( - "globals", - "incomplete_translation_treshold" - ) - end, [ - @READ - ], 95) - - nil - end - end -end - -Yast::RestoreClient.new.main diff --git a/library/cwm/Makefile.am b/library/cwm/Makefile.am deleted file mode 100644 index 5d433e585..000000000 --- a/library/cwm/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -# -# Makefile.am for yast2/sequencer -SUBDIRS = src testsuite test diff --git a/library/cwm/src/Makefile.am b/library/cwm/src/Makefile.am deleted file mode 100644 index 54da32103..000000000 --- a/library/cwm/src/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/WizardHW.rb \ - modules/DialogTree.rb \ - modules/CWM.rb \ - modules/CWMTsigKeys.rb \ - modules/CWMTable.rb \ - modules/CWMServiceStart.rb \ - modules/CWMTab.rb \ - modules/TablePopup.rb - -ycwmdir = @ylibdir@/cwm -ycwm_DATA = \ - lib/cwm/abstract_widget.rb \ - lib/cwm/common_widgets.rb \ - lib/cwm/custom_widget.rb \ - lib/cwm/dialog.rb \ - lib/cwm/page.rb \ - lib/cwm/pager.rb \ - lib/cwm/popup.rb \ - lib/cwm/service_widget.rb \ - lib/cwm/replace_point.rb \ - lib/cwm/rspec.rb \ - lib/cwm/table.rb \ - lib/cwm/tabs.rb \ - lib/cwm/tree.rb \ - lib/cwm/tree_pager.rb \ - lib/cwm/ui_state.rb \ - lib/cwm/widget.rb \ - lib/cwm/wrapper_widget.rb - -ylibdir = @ylibdir@ -ylib_DATA = lib/cwm.rb - -EXTRA_DIST = $(module_DATA) $(ylib_DATA) $(ycwm_DATA) - -include $(top_srcdir)/Makefile.am.common diff --git a/library/cwm/test/Makefile.am b/library/cwm/test/Makefile.am deleted file mode 100644 index 2ac82a974..000000000 --- a/library/cwm/test/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -TESTS = \ - abstract_widget_test.rb \ - common_widgets_test.rb \ - custom_widget_test.rb \ - dialog_test.rb \ - pager_test.rb \ - popup_test.rb \ - replace_point_test.rb \ - table_test.rb \ - tree_test.rb \ - tree_pager_test.rb \ - ui_state_test.rb \ - wrapper_widget_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS) diff --git a/library/cwm/testsuite/Makefile.am b/library/cwm/testsuite/Makefile.am deleted file mode 100644 index 956c637e3..000000000 --- a/library/cwm/testsuite/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -Y2BASEFLAGS = -I tests -export Y2BASEFLAGS - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff --git a/library/cwm/testsuite/tests/t2.err b/library/cwm/testsuite/tests/t2.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/cwm/testsuite/tests/t2.out b/library/cwm/testsuite/tests/t2.out deleted file mode 100644 index d70121d78..000000000 --- a/library/cwm/testsuite/tests/t2.out +++ /dev/null @@ -1,37 +0,0 @@ -Dump ========================================= -Dump ============ Table/Popup ============ -Dump ========================================= -Dump W: $["_cwm_attrib":$[], "_cwm_do_validate":)>, "_cwm_key":"table", "custom_widget":nil, "fallback":$["init":, "store":, "summary":], "handle":)>, "help":"

Editing the Settings
\nTo edit the settings, choose the appropriate\nentry of the table then click Edit.

To add a new option, click Add. To remove\nan option, select it and click Delete.

", "id2key":, any)>, "ids": getIdList (map)>, "init":, "options":$["a":$["popup":$["handle":)>, "widget":`textentry], "table":$["handle":`a_handle, "label":"'a' option label", "summary":, "widget":`checkbox]], "b":$[]], "widget":`HBox (`HSpacing (2), `VBox (`HBox (`Table (`id (`_tp_table), `opt (`immediate, `notify, `keepSorting), `header ("Option", "Value"), []), `HSpacing (0)), `HBox (`PushButton (`id (`_tp_add), `opt (`key_F3), "&Add"), `PushButton (`id (`_tp_edit), `opt (`key_F4), "Ed&it"), `PushButton (`id (`_tp_delete), `opt (`key_F5), "Dele&te"), `HStretch (), `ReplacePoint (`id (`_tp_table_repl), `HSpacing (0)))), `HSpacing (2))] -Dump ========================================= -Dump Init -Dump Returning list of ids for table table -Dump Translating id a of table to key -Dump wanting summary for a:a -Dump Translating id b of table to key -Log fallback_summary: id b, key b -Dump Translating id c of table to key -Log fallback_summary: id c, key c -Dump ========================================= -Dump Handle -Dump Translating id nil of table to key -Dump nil branch, returning a -Dump Returned `a_handle -Dump Translating id nil of table to key -Dump nil branch, returning a -Log a_handle: id nil, key a, event $["ID":`_tp_edit] -Dump Returned nil -Dump ========================================= -Dump Popups -Dump ====== -Dump ======================================== -Dump Merge functions -Dump Before: $["_cwm_key":"a", "popup":$["_cwm_key":"a", "handle":)>, "label":"'a' option label", "widget":`textentry], "table":$["_cwm_key":"a", "handle":)>, "label":"'a' option label", "summary":, "widget":`checkbox]] -Dump After: $["_cwm_key":"a", "popup":$["_cwm_key":"a", "handle":)>, "init":, "label":"'a' option label", "store":, "widget":`textentry], "table":$["_cwm_key":"a", "handle":)>, "label":"'a' option label", "summary":, "widget":`checkbox]] -Dump ========================================= -Dump Prepare widget -Dump Prepared: $["_cwm_key":"a", "custom_widget":nil, "handle":)>, "init":, "label":"'a' option label", "store":, "widget":`InputField (`id ("a"), `opt (`hstretch), "'a' option label")] -Dump ========================================= -Dump Run popup -Log fallback_init: id nil, key a -Log a_handle: id nil, key a, event $["ID":`_tp_ok] -Log fallback_store: id nil, key a diff --git a/library/cwm/testsuite/tests/t2.rb b/library/cwm/testsuite/tests/t2.rb deleted file mode 100644 index 87a5bb358..000000000 --- a/library/cwm/testsuite/tests/t2.rb +++ /dev/null @@ -1,151 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: -# t1.ycp -# -# Module: -# Common Widget Manipulation -# -# Summary: -# Common Widget Manipulation tests -# -# Authors: -# Jiri Srain -# -# $Id$ -# -# testedfiles: CWM.ycp testfunc.yh Testsuite.ycp -module Yast - class T2Client < Client - def main - # global define void UI::OpenDialog (term t) ``{}; - # global define void UI::CloseDialog () ``{}; - # global define symbol UI::UserInput()``{return `_tp_cancel ;} - - Yast.include self, "testsuite.rb" - Yast.import "CWM" - Yast.import "TablePopup" - Yast.import "Report" - - # disable use of UI - Report.Import("errors" => { "show" => false, "log" => true }) - - Yast.include self, "testfunc.rb" - Yast.import "Mode" - - Mode.SetTest("testsuite") - - @functions = { - "init" => fun_ref(method(:generic_init), "void (string)"), - "store" => fun_ref(method(:generic_save), "void (string, map)") - } - - @ret = nil - - DUMP("=========================================") - DUMP("============ Table/Popup ============") - DUMP("=========================================") - - @widgets = { "table" => MyCreateTable() } - @widget_data = CWM.CreateWidgets(["table"], @widgets) - DUMP(Builtins.sformat("W: %1", Ops.get(@widget_data, 0))) - - DUMP("=========================================") - DUMP("Init") - CWM.initWidgets(@widget_data) - - DUMP("=========================================") - DUMP("Handle") - - @ret = CWM.handleWidgets(@widget_data, "ID" => :_tp_edit) - DUMP(Builtins.sformat("Returned %1", @ret)) - Ops.set( - @widget_data, - [0, "options", "a", "table", "handle"], - fun_ref(method(:a_handle), "symbol (any, string, map)") - ) - @ret = CWM.handleWidgets(@widget_data, "ID" => :_tp_edit) - DUMP(Builtins.sformat("Returned %1", @ret)) - - DUMP("=========================================") - DUMP("Popups") - DUMP("======") - - DUMP("========================================") - DUMP("Merge functions") - @option = TablePopup.key2descr(Ops.get(@widget_data, 0, {}), "a") - DUMP(Builtins.sformat("Before: %1", @option)) - @option = TablePopup.updateOptionMap( - @option, - Ops.get_map(@widget_data, [0, "fallback"], {}) - ) - DUMP(Builtins.sformat("After: %1", @option)) - - DUMP("=========================================") - DUMP("Prepare widget") - @popup = Ops.get_map(@option, "popup", {}) - @popup = Builtins.add(@popup, "____", "____") # needed just to create a real copy - @popup = CWM.prepareWidget(@popup) - @popup = Builtins.remove(@popup, "____") - DUMP(Builtins.sformat("Prepared: %1", @popup)) - - DUMP("=========================================") - DUMP("Run popup") - - TablePopup.singleOptionEditPopup(@option) - - nil - end - - def MyCreateTable - ret = TablePopup.CreateTableDescr( - {}, - - "init" => fun_ref( - TablePopup.method(:TableInitWrapper), - "void (string)" - ), - "handle" => fun_ref( - TablePopup.method(:TableHandleWrapper), - "symbol (string, map)" - ), - "ids" => fun_ref(method(:getIdList), "list (map)"), - "id2key" => fun_ref(method(:id2key), "string (map, any)"), - "options" => @popups, - "fallback" => { - "init" => fun_ref(method(:fallback_init), "void (any, string)"), - "store" => fun_ref(method(:fallback_store), "void (any, string)"), - "summary" => fun_ref( - method(:fallback_summary), - "string (any, string)" - ) - } - - ) - deep_copy(ret) - end - end -end - -Yast::T2Client.new.main diff --git a/library/cwm/testsuite/tests/testfunc.rb b/library/cwm/testsuite/tests/testfunc.rb deleted file mode 100644 index 7c8f02c52..000000000 --- a/library/cwm/testsuite/tests/testfunc.rb +++ /dev/null @@ -1,197 +0,0 @@ -# encoding: utf-8 - -module Yast - module TestfuncInclude - def initialize_testfunc(include_target) - Yast.include include_target, "testsuite.rb" - - @popups = { - "a" => { - "table" => { - "widget" => :checkbox, - "summary" => fun_ref(method(:opt_sum), "string (any, string)"), - "handle" => :a_handle, - "label" => "'a' option label" - }, - "popup" => { - "widget" => :textentry, - "handle" => fun_ref(method(:a_handle), "symbol (any, string, map)") - } - }, - "b" => {} - } - - @widgets = { - "w1" => { - "widget" => :checkbox, - "opt" => [:notify, :immediate], - "label" => "Check&Box", - "init" => fun_ref(method(:w1_init), "void (string)"), - "handle" => fun_ref( - method(:w1_handle), - "symbol (string, map)" - ), - "validate_type" => :function, - "validate_function" => fun_ref( - method(:w1_validate), - "boolean (string, map)" - ) - }, - "w2" => { - "widget" => :textentry, - "label" => "Text&Entry", - "store" => fun_ref( - method(:w2_store), - "void (string, map)" - ), - "handle" => fun_ref( - method(:w2_handle), - "symbol (string, map)" - ), - "validate_type" => :function, - "validate_function" => fun_ref( - method(:w2_validate), - "boolean (string, map)" - ) - } - } - end - - def getIdList(descr) - descr = deep_copy(descr) - DUMP( - Builtins.sformat( - "Returning list of ids for table %1", - Ops.get_string(descr, "_cwm_key", "") - ) - ) - ["a", "b", "c"] - end - - def id2key(descr, opt_id) - descr = deep_copy(descr) - opt_id = deep_copy(opt_id) - DUMP( - Builtins.sformat( - "Translating id %1 of %2 to key", - opt_id, - Ops.get_string(descr, "_cwm_key", "") - ) - ) - if opt_id.nil? - DUMP("nil branch, returning a") - return "a" - end - Convert.to_string(opt_id) - end - - def opt_sum(opt_id, opt_key) - opt_id = deep_copy(opt_id) - DUMP(Builtins.sformat("wanting summary for %1:%2", opt_id, opt_key)) - Builtins.sformat("%1:%2", opt_id, opt_key) - end - - def tableOptionHandle(opt_id, opt_key, event) - opt_id = deep_copy(opt_id) - event = deep_copy(event) - DUMP( - Builtins.sformat( - "Handling op %1 on %2 (key %3)", - event, - opt_id, - opt_key - ) - ) - :new_event - end - - def a_handle(id, key, event) - id = deep_copy(id) - event = deep_copy(event) - Builtins.y2error("a_handle: id %1, key %2, event %3", id, key, event) - nil - end - - def fallback_init(id, key) - id = deep_copy(id) - Builtins.y2error("fallback_init: id %1, key %2", id, key) - - nil - end - - def fallback_summary(opt_id, opt_key) - opt_id = deep_copy(opt_id) - Builtins.y2error("fallback_summary: id %1, key %2", opt_id, opt_key) - Builtins.sformat("%1:%2", opt_id, opt_key) - end - - def fallback_store(id, key) - id = deep_copy(id) - Builtins.y2error("fallback_store: id %1, key %2", id, key) - - nil - end - - def w1_init(key) - Builtins.y2error("w1_init: Initing %1", key) - - nil - end - - def w1_handle(key, event) - event = deep_copy(event) - Builtins.y2error("w1_handle: Handling %1, event %2", key, event) - nil - end - - def w1_validate(key, event) - event = deep_copy(event) - Builtins.y2error("w1_validate: Validating %1, event %2", key, event) - true - end - - def w2_store(key, event) - event = deep_copy(event) - Builtins.y2error("w2_store: Saving %1, event %2", key, event) - - nil - end - - def w2_handle(key, event) - event = deep_copy(event) - Builtins.y2error("w2_handle: Handling %1, event %2", key, event) - nil - end - - def w2_validate(key, event) - event = deep_copy(event) - Builtins.y2error("w2_validate: Validating %1, event %2", key, event) - true - end - - def generic_init(key) - Builtins.y2error("generic_init: Initing %1", key) - - nil - end - - def generic_save(key, event) - event = deep_copy(event) - Builtins.y2error("generic_save: Saving %1, event %2", key, event) - - nil - end - - def w1_handle_symbol(key, event) - event = deep_copy(event) - Builtins.y2error("w1_handle_symbol: Handling %1, event %2", key, event) - :symbol - end - - def w1_validat_false(key, event) - event = deep_copy(event) - Builtins.y2error("w1_validate_false: Validating %1, event %2", key, event) - false - end - end -end diff --git a/library/desktop/Makefile.am b/library/desktop/Makefile.am deleted file mode 100644 index f12c8b736..000000000 --- a/library/desktop/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -# Makefile.am for yast2/library/desktop - -SUBDIRS = groups src diff --git a/library/desktop/groups/Makefile.am b/library/desktop/groups/Makefile.am deleted file mode 100644 index f79cef2f8..000000000 --- a/library/desktop/groups/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -# Makefile.am for yast2/library/desktop/groups - -desktopdir = @desktopdir@/groups -desktop_DATA = $(wildcard *.desktop) - -EXTRA_DIST = $(desktop_DATA) diff --git a/library/desktop/src/Makefile.am b/library/desktop/src/Makefile.am deleted file mode 100644 index c42f6c278..000000000 --- a/library/desktop/src/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/Desktop.rb - -client_DATA = \ - clients/menu.rb - -EXTRA_DIST = $(module_DATA) $(client_DATA) - -include $(top_srcdir)/Makefile.am.common \ No newline at end of file diff --git a/library/general/Makefile.am b/library/general/Makefile.am deleted file mode 100644 index 11ff19278..000000000 --- a/library/general/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -# Makefile.am for library/general - -SUBDIRS = src testsuite test hooks diff --git a/library/general/hooks/Makefile.am b/library/general/hooks/Makefile.am deleted file mode 100644 index 60396e367..000000000 --- a/library/general/hooks/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -hooksdir = /var/lib/YaST2/hooks - -hooks_DATA = README.md - -EXTRA_DIST = $(hooks_DATA) diff --git a/library/general/src/Makefile.am b/library/general/src/Makefile.am deleted file mode 100644 index 564fc332e..000000000 --- a/library/general/src/Makefile.am +++ /dev/null @@ -1,105 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/Linuxrc.rb \ - modules/Message.rb \ - modules/Misc.rb \ - modules/Icon.rb \ - modules/Call.rb \ - modules/AsciiFile.rb \ - modules/ContextMenu.rb \ - modules/Crash.rb \ - modules/FileUtils.rb \ - modules/Arch.rb \ - modules/Mode.rb \ - modules/Directory.rb \ - modules/Encoding.rb \ - modules/CustomDialogs.rb \ - modules/Distro.rb \ - modules/XVersion.rb \ - modules/Summary.rb \ - modules/UIHelper.rb \ - modules/DontShowAgain.rb \ - modules/Report.rb \ - modules/ValueBrowser.rb \ - modules/Event.rb \ - modules/Label.rb \ - modules/Assert.rb \ - modules/OSRelease.rb \ - modules/PackagesProposal.rb \ - modules/Popup.rb \ - modules/MailAliases.rb \ - modules/Stage.rb \ - modules/MailTable.pm \ - modules/MailTableInclude.pm \ - modules/Hooks.rb - -scrconf_DATA = \ - scrconf/cfg_mail.scr \ - scrconf/cfg_hotplug.scr \ - scrconf/proc_meminfo.scr \ - scrconf/etc_sysctl_conf.scr \ - scrconf/cfg_sysctl.scr \ - scrconf/etc_inittab.scr \ - scrconf/cfg_apache2.scr \ - scrconf/cfg_features.scr \ - scrconf/etc_ssh_sshd_config.scr \ - scrconf/cfg_displaymanager.scr \ - scrconf/cfg_yast2.scr \ - scrconf/cfg_xversion.scr \ - scrconf/yast2_groups.scr \ - scrconf/etc_fstab.scr \ - scrconf/cfg_cron.scr \ - scrconf/cfg_suseconfig.scr \ - scrconf/etc_login_defs.scr \ - scrconf/cfg_policykit.scr \ - scrconf/system_freespace.scr \ - scrconf/run_ifconfig.scr \ - scrconf/cfg_apache.scr \ - scrconf/cfg_services.scr \ - scrconf/anyxml.scr \ - scrconf/yast2_desktop.scr \ - scrconf/proc_mounts.scr \ - scrconf/proc_modules.scr \ - scrconf/cfg_ypserv.scr \ - scrconf/cfg_security.scr - -agent_SCRIPTS = \ - servers_non_y2/ag_anyxml \ - servers_non_y2/ag_freespace - -ydata_DATA = \ - data/country.ycp \ - data/country_long.ycp - -fillup_DATA = \ - fillup/sysconfig.yast2 - -ylibinstallationdir = "${yast2dir}/lib/installation" -ylibinstallation_DATA = \ - lib/installation/auto_client.rb \ - lib/installation/finish_client.rb \ - lib/installation/proposal_client.rb - -ylibuidir = "${yast2dir}/lib/ui" -ylibui_DATA = \ - lib/ui/dialog.rb \ - lib/ui/installation_dialog.rb \ - lib/ui/event_dispatcher.rb \ - lib/ui/greasemonkey.rb \ - lib/ui/service_status.rb \ - lib/ui/text_helpers.rb \ - lib/ui/widgets.rb - -ylibyast2dir = "${yast2dir}/lib/yast2" -ylibyast2_DATA = \ - lib/yast2/feedback.rb \ - lib/yast2/popup.rb \ - lib/yast2/popup_rspec.rb \ - lib/yast2/control_log_dir_rotator.rb \ - lib/yast2/log_dir_rotator.rb - -EXTRA_DIST = $(module_DATA) $(client_DATA) $(scrconf_DATA) $(agent_SCRIPTS) $(ydata_DATA) $(fillup_DATA) $(ylibinstallation_DATA) $(ylibui_DATA) $(ylibyast2_DATA) - - -include $(top_srcdir)/Makefile.am.common diff --git a/library/general/test/Makefile.am b/library/general/test/Makefile.am deleted file mode 100644 index c6dafd0db..000000000 --- a/library/general/test/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -TESTS = \ - asciifile_test.rb \ - auto_client_test.rb \ - dialog_test.rb \ - directory_test.rb \ - event_dispatcher_test.rb \ - finish_client_test.rb \ - greasemonkey_test.rb \ - hooks_test.rb \ - linuxrc_test.rb \ - os_release_test.rb \ - popup_test.rb \ - proposal_client_test.rb \ - report_test.rb \ - service_status_test.rb \ - text_helpers_test.rb \ - widgets_test.rb \ - agents_test/proc_meminfo_agent_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS) test_helper.rb diff --git a/library/general/testsuite/Makefile.am b/library/general/testsuite/Makefile.am deleted file mode 100644 index e85fbc827..000000000 --- a/library/general/testsuite/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff --git a/library/general/testsuite/tests/FileUtils.err b/library/general/testsuite/tests/FileUtils.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/general/testsuite/tests/FileUtils.out b/library/general/testsuite/tests/FileUtils.out deleted file mode 100644 index 4c895ee27..000000000 --- a/library/general/testsuite/tests/FileUtils.out +++ /dev/null @@ -1,55 +0,0 @@ -Dump =Exists===============> -Return true -Return false -Dump =IsDirectory==========> -Return true -Return false -Return nil -Dump =IsFile===============> -Return true -Return false -Return nil -Dump =IsBlock==============> -Return true -Return false -Return nil -Dump =IsFifo===============> -Return true -Return false -Return nil -Dump =IsLink===============> -Return true -Return false -Return nil -Dump =IsSocket=============> -Return true -Return false -Return nil -Dump =IsCharacterDevice====> -Return true -Return false -Return nil -Dump =GetFileRealType======> -Return block -Return chr_device -Return directory -Return fifo -Return link -Return regular -Return socket -Return nil -Dump =GetFileType======> -Return block -Return chr_device -Return directory -Return fifo -Return link -Return regular -Return socket -Return nil -Dump =GetSize==========> -Return 58899 -Dump =GetOwnerUserID===> -Return 1003 -Dump =GetOwnerGroupID==> -Return 500 diff --git a/library/general/testsuite/tests/FileUtils.rb b/library/general/testsuite/tests/FileUtils.rb deleted file mode 100644 index 73ecd7ba4..000000000 --- a/library/general/testsuite/tests/FileUtils.rb +++ /dev/null @@ -1,1070 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: FileUtils.ycp -# Package: YaST modules -# Summary: Testsuite for FileUtils Module -# Authors: Lukas Ocilka -# Copyright: Copyright 2004, Novell, Inc. All rights reserved. -# -# $Id$ -# -# Testsuite for FileUtils YCP module. -module Yast - class FileUtilsClient < Client - def main - Yast.include self, "testsuite.rb" - # testedfiles: FileUtils - - @I_READ = {} - @I_WRITE = {} - @I_EXEC = {} - - TESTSUITE_INIT([@I_READ, @I_WRITE, @I_EXEC], nil) - - Yast.import "FileUtils" - Yast.import "Mode" - - Mode.SetMode("test") - - # Each test has its own READ map. Some use lstat some use stat. - # IsAnything should return true, false, nil. - - # Existence of file - @READ_EXISTS_1 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => true, - "issock" => false, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 804, - "uid" => 0 - } - } - } - # File doesn't exist - @READ_EXISTS_2 = { "target" => { "stat" => {} } } - # File doesn't exist - @READ_EXISTS_3 = { "target" => { "lstat" => {} } } - - # Directory - @READ_DIRECTORY_1 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => false, - "isdir" => true, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 55_888, - "uid" => 0 - } - } - } - @READ_DIRECTORY_2 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => true, - "issock" => false, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 804, - "uid" => 0 - } - } - } - - # Regular file - @READ_FILE_1 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => true, - "issock" => false, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 804, - "uid" => 0 - } - } - } - @READ_FILE_2 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => true, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 55_888, - "uid" => 0 - } - } - } - - # Block - @READ_BLOCK_1 = { - "target" => { - "stat" => { - "atime" => 1_101_195_257, - "ctime" => 1_097_483_383, - "gid" => 6, - "inode" => 27_982, - "isblock" => true, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_096_706_283, - "nlink" => 1, - "size" => 0, - "uid" => 0 - } - } - } - @READ_BLOCK_2 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => false, - "isdir" => true, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 55_888, - "uid" => 0 - } - } - } - - # Fifo - @READ_FIFO_1 = { - "target" => { - "stat" => { - "atime" => 1_101_195_257, - "ctime" => 1_097_483_383, - "gid" => 6, - "inode" => 27_982, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => true, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_096_706_283, - "nlink" => 1, - "size" => 0, - "uid" => 0 - } - } - } - @READ_FIFO_2 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => false, - "isdir" => true, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 55_888, - "uid" => 0 - } - } - } - - # Link - @READ_LINK_1 = { - "target" => { - # Link uses "lstat" instead of "stat" - "lstat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => true, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_LINK_2 = { - "target" => { - # Link uses "lstat" instead of "stat" - "lstat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => true, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - - # Socket - @READ_SOCKET_1 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => true, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 55_888, - "uid" => 0 - } - } - } - @READ_SOCKET_2 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => true, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 55_888, - "uid" => 0 - } - } - } - - # Character device - @READ_CHARACTERDEVICE_1 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => true, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => true, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 55_888, - "uid" => 0 - } - } - } - @READ_CHARACTERDEVICE_2 = { - "target" => { - "stat" => { - "atime" => 1_101_890_288, - "ctime" => 1_101_890_286, - "gid" => 0, - "inode" => 29_236, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => true, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_101_890_286, - "nlink" => 1, - "size" => 55_888, - "uid" => 0 - } - } - } - - # Checking real type of file, link? returns link! instead of linked object's file. - # Using "lstat" - @READ_REALTYPE_1 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "lstat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => true, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_REALTYPE_2 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "lstat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => true, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_REALTYPE_3 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "lstat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => true, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_REALTYPE_4 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "lstat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => true, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_REALTYPE_5 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "lstat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => true, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_REALTYPE_6 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "lstat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => true, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_REALTYPE_7 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "lstat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => true, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_REALTYPE_UNKNOWN = { - "target" => { - # RealType uses "lstat" instead of "stat" - "lstat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - - # Checking relative type of file, link? returns linked object! instead of link!. - # using "stat" - @READ_UNREALTYPE_1 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "stat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => true, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_UNREALTYPE_2 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "stat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => true, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_UNREALTYPE_3 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "stat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => true, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_UNREALTYPE_4 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "stat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => true, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_UNREALTYPE_5 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "stat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => true, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_UNREALTYPE_6 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "stat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => true, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_UNREALTYPE_7 = { - "target" => { - # RealType uses "lstat" instead of "stat" - "stat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => true, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - @READ_UNREALTYPE_UNKNOWN = { - "target" => { - # UnrealType uses "stat" instead of "lstat" - "stat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 0 - } - } - } - - @READ_USER = { - "target" => { - "stat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 0, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 1003 - } - } - } - - @READ_GROUP = { - "target" => { - "stat" => { - "atime" => 1_101_892_352, - "ctime" => 1_100_268_833, - "gid" => 500, - "inode" => 19_561, - "isblock" => false, - "ischr" => false, - "isdir" => false, - "isfifo" => false, - "islink" => false, - "isreg" => false, - "issock" => false, - "mtime" => 1_100_268_833, - "nlink" => 1, - "size" => 5, - "uid" => 1003 - } - } - } - - @READ_SIZE = { "target" => { "size" => 58_899 } } - - @WRITE = {} - @EXEC = {} - - @tested_file = "/file/name/anywhere.is" - - DUMP("=Exists===============>") - TEST(->() { FileUtils.Exists(@tested_file) }, - [ - @READ_EXISTS_1, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.Exists(@tested_file) }, - [ - @READ_EXISTS_2, - @WRITE, - @EXEC - ], 0) - DUMP("=IsDirectory==========>") - TEST(->() { FileUtils.IsDirectory(@tested_file) }, - [ - @READ_DIRECTORY_1, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsDirectory(@tested_file) }, - [ - @READ_DIRECTORY_2, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsDirectory(@tested_file) }, - [ - @READ_EXISTS_2, - @WRITE, - @EXEC - ], 0) - DUMP("=IsFile===============>") - TEST(->() { FileUtils.IsFile(@tested_file) }, - [ - @READ_FILE_1, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsFile(@tested_file) }, - [ - @READ_FILE_2, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsFile(@tested_file) }, - [ - @READ_EXISTS_2, - @WRITE, - @EXEC - ], 0) - DUMP("=IsBlock==============>") - TEST(->() { FileUtils.IsBlock(@tested_file) }, - [ - @READ_BLOCK_1, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsBlock(@tested_file) }, - [ - @READ_BLOCK_2, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsBlock(@tested_file) }, - [ - @READ_EXISTS_2, - @WRITE, - @EXEC - ], 0) - DUMP("=IsFifo===============>") - TEST(->() { FileUtils.IsFifo(@tested_file) }, - [ - @READ_FIFO_1, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsFifo(@tested_file) }, - [ - @READ_FIFO_2, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsFifo(@tested_file) }, - [ - @READ_EXISTS_2, - @WRITE, - @EXEC - ], 0) - DUMP("=IsLink===============>") - TEST(->() { FileUtils.IsLink(@tested_file) }, - [ - @READ_LINK_1, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsLink(@tested_file) }, - [ - @READ_LINK_2, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsLink(@tested_file) }, - [ - @READ_EXISTS_3, - @WRITE, - @EXEC - ], 0) - DUMP("=IsSocket=============>") - TEST(->() { FileUtils.IsSocket(@tested_file) }, - [ - @READ_SOCKET_1, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsSocket(@tested_file) }, - [ - @READ_SOCKET_2, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsSocket(@tested_file) }, - [ - @READ_EXISTS_2, - @WRITE, - @EXEC - ], 0) - DUMP("=IsCharacterDevice====>") - TEST(->() { FileUtils.IsCharacterDevice(@tested_file) }, - [ - @READ_CHARACTERDEVICE_1, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsCharacterDevice(@tested_file) }, - [ - @READ_CHARACTERDEVICE_2, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.IsCharacterDevice(@tested_file) }, - [ - @READ_EXISTS_2, - @WRITE, - @EXEC - ], 0) - DUMP("=GetFileRealType======>") - TEST(->() { FileUtils.GetFileRealType(@tested_file) }, - [ - @READ_REALTYPE_1, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileRealType(@tested_file) }, - [ - @READ_REALTYPE_2, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileRealType(@tested_file) }, - [ - @READ_REALTYPE_3, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileRealType(@tested_file) }, - [ - @READ_REALTYPE_4, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileRealType(@tested_file) }, - [ - @READ_REALTYPE_5, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileRealType(@tested_file) }, - [ - @READ_REALTYPE_6, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileRealType(@tested_file) }, - [ - @READ_REALTYPE_7, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileRealType(@tested_file) }, - [ - @READ_REALTYPE_UNKNOWN, - @WRITE, - @EXEC - ], 0) - DUMP("=GetFileType======>") - TEST(->() { FileUtils.GetFileType(@tested_file) }, - [ - @READ_UNREALTYPE_1, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileType(@tested_file) }, - [ - @READ_UNREALTYPE_2, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileType(@tested_file) }, - [ - @READ_UNREALTYPE_3, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileType(@tested_file) }, - [ - @READ_UNREALTYPE_4, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileType(@tested_file) }, - [ - @READ_UNREALTYPE_5, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileType(@tested_file) }, - [ - @READ_UNREALTYPE_6, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileType(@tested_file) }, - [ - @READ_UNREALTYPE_7, - @WRITE, - @EXEC - ], 0) - TEST(->() { FileUtils.GetFileType(@tested_file) }, - [ - @READ_UNREALTYPE_UNKNOWN, - @WRITE, - @EXEC - ], 0) - DUMP("=GetSize==========>") - TEST(->() { FileUtils.GetSize(@tested_file) }, - [ - @READ_SIZE, - @WRITE, - @EXEC - ], 0) - DUMP("=GetOwnerUserID===>") - TEST(->() { FileUtils.GetOwnerUserID(@tested_file) }, - [ - @READ_USER, - @WRITE, - @EXEC - ], 0) - DUMP("=GetOwnerGroupID==>") - TEST(->() { FileUtils.GetOwnerGroupID(@tested_file) }, - [ - @READ_GROUP, - @WRITE, - @EXEC - ], 0) - - nil - end - end -end - -Yast::FileUtilsClient.new.main diff --git a/library/gpg/Makefile.am b/library/gpg/Makefile.am deleted file mode 100644 index 3f3ce6a67..000000000 --- a/library/gpg/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# -# Makefile.am for yast2/gpg -# - -SUBDIRS = src diff --git a/library/gpg/src/Makefile.am b/library/gpg/src/Makefile.am deleted file mode 100644 index f9a4249de..000000000 --- a/library/gpg/src/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/GPG.rb \ - modules/GPGWidgets.rb - -EXTRA_DIST = $(module_DATA) - -include $(top_srcdir)/Makefile.am.common \ No newline at end of file diff --git a/library/log/Makefile.am b/library/log/Makefile.am deleted file mode 100644 index b7a1fa2c6..000000000 --- a/library/log/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -# -# Makefile.am for yast2/sequencer -SUBDIRS = src diff --git a/library/log/src/Makefile.am b/library/log/src/Makefile.am deleted file mode 100644 index d23c46777..000000000 --- a/library/log/src/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/LogView.rb \ - modules/LogViewCore.rb - -EXTRA_DIST = $(module_DATA) - -include $(top_srcdir)/Makefile.am.common diff --git a/library/network/Makefile.am b/library/network/Makefile.am deleted file mode 100644 index 37db827d9..000000000 --- a/library/network/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# -# Makefile.am for yast2/library/network -# - -SUBDIRS = src testsuite test diff --git a/library/network/src/Makefile.am b/library/network/src/Makefile.am deleted file mode 100644 index 8c3dceab8..000000000 --- a/library/network/src/Makefile.am +++ /dev/null @@ -1,64 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/PortAliases.rb \ - modules/SuSEFirewall.rb \ - modules/NetworkConfig.rb \ - modules/Internet.rb \ - modules/SuSEFirewallProposal.rb \ - modules/PortRanges.rb \ - modules/NetworkInterfaces.rb \ - modules/CWMFirewallInterfaces.rb \ - modules/NetworkPopup.rb \ - modules/NetworkService.rb \ - modules/SuSEFirewallServices.rb \ - modules/SLPAPI.pm \ - modules/DnsServerAPI.pm \ - modules/firewalld_wrapper.rb - -scrconf_DATA = \ - scrconf/sysconfig_SuSEfirewall2.scr \ - scrconf/net_showexports.scr \ - scrconf/network.scr - -agent_SCRIPTS = \ - servers_non_y2/ag_showexports - -ylibdir = @ylibdir@/network -ylib_DATA = \ - lib/network/firewalld.rb \ - lib/network/susefirewall.rb \ - lib/network/susefirewall2.rb \ - lib/network/susefirewalld.rb \ - lib/network/susefirewallservices.rb \ - lib/network/susefirewall2services.rb \ - lib/network/susefirewalldservices.rb - -yfwlibdir = @ylibdir@/y2firewall -yfwlib_DATA = \ - lib/y2firewall/firewalld.rb - -yfwdlibdir = @ylibdir@/y2firewall/firewalld -yfwdlib_DATA = \ - lib/y2firewall/firewalld/api.rb \ - lib/y2firewall/firewalld/interface.rb \ - lib/y2firewall/firewalld/relations.rb \ - lib/y2firewall/firewalld/service.rb \ - lib/y2firewall/firewalld/zone.rb \ - lib/y2firewall/firewalld/zone_reader.rb \ - lib/y2firewall/firewalld/service_reader.rb - -yfwdapilibdir = @ylibdir@/y2firewall/firewalld/api/ -yfwdapilib_DATA = \ - lib/y2firewall/firewalld/api/services.rb \ - lib/y2firewall/firewalld/api/zones.rb - -yfwhelperslibdir = @ylibdir@/y2firewall/helpers -yfwhelperslib_DATA = \ - lib/y2firewall/helpers/interfaces.rb - -EXTRA_DIST = \ - $(module_DATA) $(scrconf_DATA) $(agent_SCRIPTS) $(ylib_DATA) \ - $(yfwlib_DATA) $(yfwdlib_DATA) $(yfwdapilib_DATA) $(yfwhelperslib_DATA) - -include $(top_srcdir)/Makefile.am.common diff --git a/library/network/src/lib/network/.rubocop.yml b/library/network/src/lib/network/.rubocop.yml deleted file mode 100644 index d25cb8b95..000000000 --- a/library/network/src/lib/network/.rubocop.yml +++ /dev/null @@ -1,21 +0,0 @@ -# use the shared Yast defaults -inherit_from: - - ../../../../../.rubocop.yml - -Style/MethodName: - Exclude: - - "susefirewall.rb" - - "susefirewalld.rb" - - "susefirewall2.rb" - -Style/Next: - # skip this check for SuSEFirewall modules since it forces us to - # refactor the code in a sub-optimal way. - Exclude: - - "susefirewalld.rb" - -Style/VariableName: - Exclude: - - "susefirewall.rb" - - "susefirewalld.rb" - - "susefirewall2.rb" diff --git a/library/network/src/lib/network/susefirewall2services.rb b/library/network/src/lib/network/susefirewall2services.rb index 9fc1d2570..ed4a0eb4a 100644 --- a/library/network/src/lib/network/susefirewall2services.rb +++ b/library/network/src/lib/network/susefirewall2services.rb @@ -21,19 +21,14 @@ # you may find current contact information at www.novell.com # # *************************************************************************** -# -# Package: Firewall Services, Ports Aliases. -# Summary: Definition of Supported Firewall Services and Port Aliases. -# Authors: Lukas Ocilka -# -# Global Definition of Firewall Services -# Defined using TCP, UDP and RPC ports and IP protocols and Broadcast UDP -# ports. Results are cached, so repeating requests are answered faster. require "yast" require "network/susefirewallservices" module Yast + # Global Definition of Firewall Services + # Defined using TCP, UDP and RPC ports and IP protocols and Broadcast UDP + # ports. Results are cached, so repeating requests are answered faster. class SuSEFirewall2ServicesClass < SuSEFirewallServicesClass include Yast::Logger diff --git a/library/network/src/lib/network/susefirewalldservices.rb b/library/network/src/lib/network/susefirewalldservices.rb index e3202cbe1..02f5a4c5a 100644 --- a/library/network/src/lib/network/susefirewalldservices.rb +++ b/library/network/src/lib/network/susefirewalldservices.rb @@ -21,19 +21,14 @@ # you may find current contact information at www.novell.com # # *************************************************************************** -# -# Package: Firewall Services, Ports Aliases. -# Summary: Definition of Supported Firewall Services and Port Aliases for FirewallD -# Authors: Markos Chandras -# -# Global Definition of Firewall Services -# Defined using TCP, UDP and RPC ports and IP protocols and Broadcast UDP -# ports. Results are cached, so repeating requests are answered faster. require "yast" require "network/susefirewallservices" module Yast + # Global Definition of Firewall Services + # Defined using TCP, UDP and RPC ports and IP protocols and Broadcast UDP + # ports. Results are cached, so repeating requests are answered faster. class SuSEFirewalldServicesClass < SuSEFirewallServicesClass include Yast::Logger diff --git a/library/network/src/lib/network/susefirewallservices.rb b/library/network/src/lib/network/susefirewallservices.rb index 0c42eae63..bdb65fea1 100644 --- a/library/network/src/lib/network/susefirewallservices.rb +++ b/library/network/src/lib/network/susefirewallservices.rb @@ -21,23 +21,19 @@ # you may find current contact information at www.novell.com # # *************************************************************************** -# -# Package: Firewall Services, Ports Aliases. -# Summary: Definition of Supported Firewall Services and Port Aliases. -# Authors: Markos Chandras -# -# Global Definition of Firewall Services -# Manages services for SuSEFirewall2 and FirewallD require "yast" module Yast + # Service not found exception class SuSEFirewalServiceNotFound < StandardError def initialize(message) super message end end + # Global Definition of Firewall Services + # Manages services for SuSEFirewall2 and FirewallD class SuSEFirewallServicesClass < Module include Yast::Logger diff --git a/library/network/src/scrconf/network.scr.in b/library/network/src/scrconf/network.scr similarity index 76% rename from library/network/src/scrconf/network.scr.in rename to library/network/src/scrconf/network.scr index 8a02222a1..efdd701ef 100644 --- a/library/network/src/scrconf/network.scr.in +++ b/library/network/src/scrconf/network.scr @@ -1,9 +1,8 @@ // @configure_input@ /** * File: network.scr - * Summary: Agent for @IFCFG_DIR@/ifcfg-* + * Summary: Agent for /etc/sysconfig/network/ifcfg-* * Author: Michal Svec - * Modified: Wenji Huang * Access: read / write * See: sysconfig.rpm * @@ -15,13 +14,13 @@ * * $Id$ * - *

Reads/writes @IFCFG_DIR@/ifcfg-*. For more details + *

Reads/writes /etc/sysconfig/network/ifcfg-*. For more details * see its own documentation.

*/ .network `ag_ini( - `IniAgent( [ "@IFCFG_DIR@/ifcfg-*" ], + `IniAgent( [ "/etc/sysconfig/network/ifcfg-*" ], $[ /* values at the top level, allow comments after value */ "options" : [ "global_values", "comments_last", "shell_quoted_value" ], @@ -33,7 +32,7 @@ ], /* matching rules */ "rewrite" : [ - [ "@IFCFG_DIR@/ifcfg-(.*)", "@IFCFG_DIR@/ifcfg-%s" ], + [ "/etc/sysconfig/network/ifcfg-(.*)", "/etc/sysconfig/network/ifcfg-%s" ], ], ] )) diff --git a/library/network/test/Makefile.am b/library/network/test/Makefile.am deleted file mode 100644 index 429aa9f43..000000000 --- a/library/network/test/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -TESTS = \ - load_ipv6_cfg_test.rb \ - network_interfaces_test.rb \ - network_interfaces_helpers_test.rb \ - network_service_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS) diff --git a/library/network/test/firewalld_wrapper_test.rb b/library/network/test/firewalld_wrapper_test.rb index 7cc6184ac..e549cc9e6 100755 --- a/library/network/test/firewalld_wrapper_test.rb +++ b/library/network/test/firewalld_wrapper_test.rb @@ -55,12 +55,13 @@ describe "#add_port" do before do allow(external).to receive(:add_port).and_return(true) + allow(subject).to receive(:valid_port?).and_return(true) end it "returns false if the port is not a port, a valid range or an alias" do + allow(subject).to receive(:valid_port?).and_return(false) expect(subject.add_port("asdasd", "TCP", "eth0")).to eq(false) expect(subject.add_port("8080:8070", "TCP", "eth0")).to eq(false) - expect(subject.add_port("ssh", "TCP", "eth0")).to eq(true) end it "returns false if the protocol is not supported" do @@ -88,12 +89,13 @@ describe "#remove_port" do before do allow(external).to receive(:remove_port).and_return(true) + allow(subject).to receive(:valid_port?).and_return(true) end it "returns false if the port is not a port, a valid range or an alias" do + allow(subject).to receive(:valid_port?).and_return(false) expect(subject.remove_port("asdasd", "TCP", "eth0")).to eq(false) expect(subject.remove_port("8080:8070", "TCP", "eth0")).to eq(false) - expect(subject.remove_port("ssh", "TCP", "eth0")).to eq(true) end it "returns false if the protocol is not supported" do diff --git a/library/network/testsuite/Makefile.am b/library/network/testsuite/Makefile.am deleted file mode 100644 index e85fbc827..000000000 --- a/library/network/testsuite/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff --git a/library/network/testsuite/tests/NetworkInterfaces3.err b/library/network/testsuite/tests/NetworkInterfaces3.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/network/testsuite/tests/NetworkInterfaces3.out b/library/network/testsuite/tests/NetworkInterfaces3.out deleted file mode 100644 index eb2fdd094..000000000 --- a/library/network/testsuite/tests/NetworkInterfaces3.out +++ /dev/null @@ -1,6 +0,0 @@ -Read .target.tmpdir nil -Log Failed to set temporary directory: nil -Dump ConcealSecrets: -Return $["eth":$["0":$["other":"data"], "1":$["other":"data"]], "wlan":$["id-00:11:22:33:44:55":$["WIRELESS_KEY":"CONCEALED", "WIRELESS_KEY_1":"CONCEALED", "WIRELESS_KEY_2":"CONCEALED", "WIRELESS_KEY_3":"CONCEALED", "WIRELESS_KEY_4":"", "WIRELESS_KEY_LENGTH":"128", "WIRELESS_WPA_PASSWORD":"CONCEALED", "WIRELESS_WPA_PSK":"CONCEALED", "_aliases":$["foo":$["WIRELESS_KEY":"not masked, should not be here", "alias":"data"]], "other":"data"], "id-aa:bb:cc:dd:ee:ff":$["WIRELESS_KEY":"CONCEALED", "WIRELESS_KEY_1":"CONCEALED", "WIRELESS_KEY_2":"CONCEALED", "WIRELESS_KEY_3":"CONCEALED", "WIRELESS_KEY_4":"", "WIRELESS_KEY_LENGTH":"128", "WIRELESS_WPA_PASSWORD":"CONCEALED", "WIRELESS_WPA_PSK":"CONCEALED", "_aliases":$["foo":$["WIRELESS_KEY":"not masked, should not be here", "alias":"data"]], "other":"data"]]] -Return nil -Return $[] diff --git a/library/network/testsuite/tests/NetworkInterfaces3.rb b/library/network/testsuite/tests/NetworkInterfaces3.rb deleted file mode 100644 index b09ea24c6..000000000 --- a/library/network/testsuite/tests/NetworkInterfaces3.rb +++ /dev/null @@ -1,77 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class NetworkInterfaces3Client < Client - def main - Yast.include self, "testsuite.rb" - - Yast.import "NetworkInterfaces" - - @simple = { - "WIRELESS_KEY" => "secret", - "WIRELESS_KEY_1" => "secret1", - "WIRELESS_KEY_2" => "secret2", - "WIRELESS_KEY_3" => "secret3", - "WIRELESS_KEY_4" => "", # no need to conceal empty ones - "WIRELESS_KEY_LENGTH" => "128", # not a secret - "WIRELESS_WPA_PSK" => "secretpsk", - "WIRELESS_WPA_PASSWORD" => "seekrut", - "other" => "data", - "_aliases" => { - "foo" => { - "WIRELESS_KEY" => "not masked, should not be here", - "alias" => "data" - } - } - } - - DUMP("ConcealSecrets:") - @devss = [ - # normal cases - { - "eth" => { - "0" => { "other" => "data" }, - "1" => { "other" => "data" } - }, - "wlan" => { - "id-00:11:22:33:44:55" => @simple, - "id-aa:bb:cc:dd:ee:ff" => @simple - } - }, - # error cases - nil, - {} - ] - Builtins.foreach(@devss) do |devs| - TEST(lambda do - NetworkInterfaces.ConcealSecrets(devs) - end, [], nil) - end - - nil - end - end -end - -Yast::NetworkInterfaces3Client.new.main diff --git a/library/network/testsuite/tests/NetworkInterfaces4.err b/library/network/testsuite/tests/NetworkInterfaces4.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/network/testsuite/tests/NetworkInterfaces4.out b/library/network/testsuite/tests/NetworkInterfaces4.out deleted file mode 100644 index eba881637..000000000 --- a/library/network/testsuite/tests/NetworkInterfaces4.out +++ /dev/null @@ -1,15 +0,0 @@ -Read .target.tmpdir "/tmp" -Dump NetworkInterfaces::Read -Dir .network.section: ["eth4"] -Dir .network.value."eth4": ["BOOTPROTO", "NAME"] -Read .network.value."eth4".BOOTPROTO "dhcp" -Read .network.value."eth4".NAME "we like 'singles'" -Read .target.stat "/sys/class/net/eth4/type" nil -Read .target.string "/sys/class/net/eth4/type" nil -Return true -Dump NetworkInterfaces::Write -Write .network.value."eth4".BOOTPROTO "dhcp" true -Write .network.value."eth4".NAME "we like 'singles'" true -Write .network.value."eth4".STARTMODE "" true -Write .network nil true -Return true diff --git a/library/network/testsuite/tests/NetworkInterfaces4.rb b/library/network/testsuite/tests/NetworkInterfaces4.rb deleted file mode 100644 index 2dbdfd564..000000000 --- a/library/network/testsuite/tests/NetworkInterfaces4.rb +++ /dev/null @@ -1,68 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - # inject NetworkInterfaces accessor so we can modify Devices - class NetworkInterfacesClass < Module - attr_accessor :OriginalDevices - end - - class NetworkInterfaces4Client < Client - def main - # bug 72164 - - Yast.include self, "testsuite.rb" - - @READ = { - "network" => { - "section" => { "eth4" => nil }, - "value" => { - "eth4" => { "BOOTPROTO" => "dhcp", "NAME" => "we like 'singles'" } - } - }, - "probe" => { "system" => [] }, - "target" => { "tmpdir" => "/tmp" } - } - - @EXEC = { - "target" => { - "bash_output" => { "exit" => 0, "stdout" => "", "stderr" => "" } - } - } - - TESTSUITE_INIT([@READ, {}, @EXEC], nil) - Yast.import "NetworkInterfaces" - - DUMP("NetworkInterfaces::Read") - TEST(->() { NetworkInterfaces.Read }, [@READ, {}, @EXEC], nil) - NetworkInterfaces.OriginalDevices = nil - - DUMP("NetworkInterfaces::Write") - TEST(->() { NetworkInterfaces.Write("") }, [@READ], nil) - - nil - end - end -end - -Yast::NetworkInterfaces4Client.new.main diff --git a/library/network/testsuite/tests/NetworkInterfaces5-Type.err b/library/network/testsuite/tests/NetworkInterfaces5-Type.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/network/testsuite/tests/NetworkInterfaces5-Type.out b/library/network/testsuite/tests/NetworkInterfaces5-Type.out deleted file mode 100644 index 2f623b355..000000000 --- a/library/network/testsuite/tests/NetworkInterfaces5-Type.out +++ /dev/null @@ -1,6 +0,0 @@ -Read .target.tmpdir nil -Log Failed to set temporary directory: nil -Dump NetworkInterfaces::GetTypeFromIfcfg -Return true -Return true -Return true diff --git a/library/network/testsuite/tests/NetworkInterfaces5-Type.rb b/library/network/testsuite/tests/NetworkInterfaces5-Type.rb deleted file mode 100644 index dd749a3ff..000000000 --- a/library/network/testsuite/tests/NetworkInterfaces5-Type.rb +++ /dev/null @@ -1,65 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# bnc#704999 -module Yast - class NetworkInterfaces5TypeClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Assert" - Yast.import "NetworkInterfaces" - - @mybond = { - "BOOTPROTO" => "dhcp", - "BONDING_MASTER" => "yes", - "BONDING_SLAVE_0" => "eth0", - "BONDING_SLAVE_1" => "eth1" - } - - @mybridged = { - "BOOTPROTO" => "dhcp", - "BRIDGE" => "yes", - "BRIDGE_PORTS" => "eth0 tap0" - } - - @myvirt = { "BOOTPROTO" => "static", "TUNNEL" => "tap" } - - DUMP("NetworkInterfaces::GetTypeFromIfcfg") - TEST(lambda do - Assert.Equal("bond", NetworkInterfaces.GetTypeFromIfcfg(@mybond)) - end, [], nil) - TEST(lambda do - Assert.Equal("br", NetworkInterfaces.GetTypeFromIfcfg(@mybridged)) - end, [], nil) - TEST(lambda do - Assert.Equal("tap", NetworkInterfaces.GetTypeFromIfcfg(@myvirt)) - end, [], nil) - - # EOF - - nil - end - end -end - -Yast::NetworkInterfaces5TypeClient.new.main diff --git a/library/network/testsuite/tests/PortAliases.err b/library/network/testsuite/tests/PortAliases.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/network/testsuite/tests/PortAliases.out b/library/network/testsuite/tests/PortAliases.out deleted file mode 100644 index b797d65f5..000000000 --- a/library/network/testsuite/tests/PortAliases.out +++ /dev/null @@ -1,68 +0,0 @@ -Dump == Allowed Port Aliases == -Return true -Return true -Return false -Return true -Return true -Return false -Dump -Dump == Service Aliases Included == -Return ["22", "ssh"] -Return ["22", "ssh"] -Return ["25", "smtp"] -Return ["25", "smtp"] -Return ["53", "domain"] -Return ["53", "domain"] -Return ["67", "bootps"] -Return ["67", "bootps"] -Return ["68", "bootpc"] -Return ["68", "bootpc"] -Return ["69", "tftp"] -Return ["69", "tftp"] -Return ["80", "http", "www", "www-http"] -Return ["80", "http", "www", "www-http"] -Return ["80", "http", "www", "www-http"] -Return ["80", "http", "www", "www-http"] -Return ["110", "pop3"] -Return ["110", "pop3"] -Return ["111", "sunrpc"] -Return ["111", "sunrpc"] -Return ["123", "ntp"] -Return ["123", "ntp"] -Return ["137", "netbios-ns"] -Return ["137", "netbios-ns"] -Return ["138", "netbios-dgm"] -Return ["139", "netbios-ssn"] -Return ["138", "netbios-dgm"] -Return ["143", "imap"] -Return ["139", "netbios-ssn"] -Return ["389", "ldap"] -Return ["389", "ldap"] -Return ["443", "https"] -Return ["443", "https"] -Return ["445", "microsoft-ds"] -Return ["445", "microsoft-ds"] -Return ["500", "isakmp"] -Return ["500", "isakmp"] -Return ["631", "ipp"] -Return ["631", "ipp"] -Return ["636", "ldaps"] -Return ["636", "ldaps"] -Return ["873", "rsync"] -Return ["873", "rsync"] -Return ["993", "imaps"] -Return ["993", "imaps"] -Return ["995", "pop3s"] -Return ["995", "pop3s"] -Return ["3128", "ndl-aas"] -Return ["3128", "ndl-aas"] -Return ["4500", "ipsec-nat-t"] -Return ["4500", "ipsec-nat-t"] -Return ["8080", "http-alt"] -Return ["8080", "http-alt"] -Dump -Dump == Service Aliases External == -Return ["333", "texar"] -Dump -Dump == Port Name == -Return true diff --git a/library/network/testsuite/tests/PortAliases.rb b/library/network/testsuite/tests/PortAliases.rb deleted file mode 100644 index ef93a9a21..000000000 --- a/library/network/testsuite/tests/PortAliases.rb +++ /dev/null @@ -1,175 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class PortAliasesClient < Client - def main - Yast.include self, "testsuite.rb" - # testedfiles: PortAliases - - @READ = {} - - @WRITE = {} - - @EXECUTE = { - "target" => { - "bash_output" => { - "exit" => 0, - "stdout" => "texar\ntexar", - "stderr" => "" - } - } - } - - TESTSUITE_INIT([@READ, @WRITE, @EXECUTE], nil) - Yast.import "PortAliases" - - DUMP("== Allowed Port Aliases ==") - TEST(->() { PortAliases.IsAllowedPortName("xyz-abc-def") }, - [ - @READ, - @WRITE, - @EXECUTE - ], nil) - TEST(->() { PortAliases.IsAllowedPortName("a*a/b+b.c_c-d") }, - [ - @READ, - @WRITE, - @EXECUTE - ], nil) - TEST(->() { PortAliases.IsAllowedPortName("!port") }, - [ - @READ, - @WRITE, - @EXECUTE - ], nil) - TEST(->() { PortAliases.IsAllowedPortName("1") }, - [ - @READ, - @WRITE, - @EXECUTE - ], nil) - TEST(->() { PortAliases.IsAllowedPortName("65535") }, - [ - @READ, - @WRITE, - @EXECUTE - ], nil) - TEST(->() { PortAliases.IsAllowedPortName("65536") }, - [ - @READ, - @WRITE, - @EXECUTE - ], nil) - - DUMP("") - DUMP("== Service Aliases Included ==") - Builtins.foreach( - [ - "22", - "ssh", - "25", - "smtp", - "53", - "domain", - "67", - "bootps", - "68", - "bootpc", - "69", - "tftp", - "80", - "http", - "www", - "www-http", - "110", - "pop3", - "111", - "sunrpc", - "123", - "ntp", - "137", - "netbios-ns", - "138", - "139", - "netbios-dgm", - "143", - "netbios-ssn", - "389", - "ldap", - "443", - "https", - "445", - "microsoft-ds", - "500", - "isakmp", - "631", - "ipp", - "636", - "ldaps", - "873", - "rsync", - "993", - "imaps", - "995", - "pop3s", - "3128", - "ndl-aas", - "4500", - "ipsec-nat-t", - "8080", - "http-alt" - ] - ) do |port| - TEST(->() { PortAliases.GetListOfServiceAliases(port) }, - [ - @READ, - @WRITE, - @EXECUTE - ], nil) - end - - DUMP("") - DUMP("== Service Aliases External ==") - TEST(->() { PortAliases.GetListOfServiceAliases("333") }, - [ - @READ, - @WRITE, - @EXECUTE - ], nil) - - DUMP("") - DUMP("== Port Name ==") - TEST(->() { PortAliases.IsKnownPortName("www") }, - [ - @READ, - @WRITE, - @EXECUTE - ], nil) - - nil - end - end -end - -Yast::PortAliasesClient.new.main diff --git a/library/packages/Makefile.am b/library/packages/Makefile.am deleted file mode 100644 index bba61f8fc..000000000 --- a/library/packages/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -# Makefile.am for yast2/library/packages - -SUBDIRS = src testsuite test diff --git a/library/packages/src/Makefile.am b/library/packages/src/Makefile.am deleted file mode 100644 index 3f7789a7c..000000000 --- a/library/packages/src/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/PackageCallbacks.rb \ - modules/SignatureCheckDialogs.rb \ - modules/PackageLock.rb \ - modules/PackagesUI.rb \ - modules/PackageAI.rb \ - modules/Slides.rb \ - modules/PackageCallbacksInit.rb \ - modules/Product.rb \ - modules/SlideShow.rb \ - modules/SignatureCheckCallbacks.rb \ - modules/PackageKit.rb \ - modules/PackageSystem.rb \ - modules/Package.rb - -yncludedir = @yncludedir@/packages -ynclude_DATA = \ - include/packages/common.rb - -ylibdir = "${yast2dir}/lib/packages" -ylib_DATA = \ - lib/packages/commit_result.rb \ - lib/packages/dummy_callbacks.rb \ - lib/packages/file_conflict_callbacks.rb \ - lib/packages/package_downloader.rb \ - lib/packages/package_extractor.rb \ - lib/packages/update_message.rb \ - lib/packages/update_messages_view.rb - -y2packagerdir = "${yast2dir}/lib/y2packager" -y2packager_DATA = \ - lib/y2packager/license.rb \ - lib/y2packager/licenses_handlers.rb \ - lib/y2packager/licenses_fetchers.rb \ - lib/y2packager/package.rb \ - lib/y2packager/product.rb \ - lib/y2packager/product_license.rb \ - lib/y2packager/product_reader.rb \ - lib/y2packager/product_sorter.rb \ - lib/y2packager/product_upgrade.rb \ - lib/y2packager/release_notes.rb \ - lib/y2packager/release_notes_content_prefs.rb \ - lib/y2packager/release_notes_reader.rb \ - lib/y2packager/release_notes_store.rb - -y2rns_fetchersdir = "${yast2dir}/lib/y2packager/release_notes_fetchers" -y2rns_fetchers_DATA = \ - lib/y2packager/release_notes_fetchers/base.rb \ - lib/y2packager/release_notes_fetchers/rpm.rb \ - lib/y2packager/release_notes_fetchers/url.rb - -y2licenses_fetchersdir = "${yast2dir}/lib/y2packager/licenses_fetchers" -y2licenses_fetchers_DATA = \ - lib/y2packager/licenses_fetchers/base.rb \ - lib/y2packager/licenses_fetchers/libzypp.rb \ - lib/y2packager/licenses_fetchers/rpm.rb - -y2licenses_handlersdir = "${yast2dir}/lib/y2packager/licenses_handlers" -y2licenses_handlers_DATA = \ - lib/y2packager/licenses_handlers/base.rb \ - lib/y2packager/licenses_handlers/libzypp.rb \ - lib/y2packager/licenses_handlers/rpm.rb - -EXTRA_DIST = $(module_DATA) $(ynclude_DATA) $(ylib_DATA) $(y2packager_DATA) $(y2rns_fetchers_DATA) \ - $(y2licenses_fetchers_DATA) $(y2licenses_handlers_DATA) - -include $(top_srcdir)/Makefile.am.common diff --git a/library/packages/test/Makefile.am b/library/packages/test/Makefile.am deleted file mode 100644 index 8d737b0b8..000000000 --- a/library/packages/test/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -TESTS = \ - commit_result_test.rb \ - dummy_callbacks_test.rb \ - file_conflict_callbacks_test.rb \ - package_callbacks_test.rb \ - lib/package_downloader_test.rb \ - lib/package_extractor_test.rb \ - packages_ui_test.rb \ - product_test.rb \ - signature_check_callbacks_test.rb \ - slide_show_test.rb \ - update_messages_view_test.rb \ - y2packager/licenses_fetchers/libzypp_test.rb \ - y2packager/licenses_fetchers/rpm_test.rb \ - y2packager/licenses_fetchers/shared_examples.rb \ - y2packager/licenses_handlers/libzypp_test.rb \ - y2packager/licenses_handlers/rpm_test.rb \ - y2packager/package_test.rb \ - y2packager/product_reader_test.rb \ - y2packager/product_sorter_test.rb \ - y2packager/product_test.rb \ - y2packager/product_upgrade_test.rb \ - y2packager/release_notes_content_prefs_test.rb \ - y2packager/release_notes_fetchers/base_test.rb \ - y2packager/release_notes_fetchers/rpm_test.rb \ - y2packager/release_notes_fetchers/url_test.rb \ - y2packager/release_notes_reader_test.rb \ - y2packager/release_notes_store_test.rb \ - y2packager/release_notes_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS) test_helper.rb diff --git a/library/packages/testsuite/Makefile.am b/library/packages/testsuite/Makefile.am deleted file mode 100644 index e85fbc827..000000000 --- a/library/packages/testsuite/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff --git a/library/packages/testsuite/packages-test.rb b/library/packages/testsuite/packages-test.rb deleted file mode 100644 index a8ae217ed..000000000 --- a/library/packages/testsuite/packages-test.rb +++ /dev/null @@ -1,119 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: packages-test.ycp -# Package: yast2 -# Summary: Packages manipulation test client -# Authors: Michal Svec -# -# $Id$ -module Yast - class PackagesTestClient < Client - def main - Yast.import "Popup" - Yast.import "Package" - - @success = 0 - @failure = 0 - - @e = "mtx" - @n = "blemc" - - @el = [@e, "xntp-doc"] - @nl = [@n, "bzum"] - - # FIXME: test presence of mtx, xntp-doc - - # failtest: T(``(Package::Installed("rpm")), false); - - T(->() { Package.Available(@e) }, true) - T(->() { Package.Available(@n) }, false) - - T(->() { Package.AvailableAll(@el) }, true) - T(->() { Package.AvailableAll(@nl) }, false) - T(->() { Package.AvailableAll(Builtins.add(@el, "bzum")) }, false) - - T(->() { Package.AvailableAny(@el) }, true) - T(->() { Package.AvailableAny(@nl) }, false) - T(->() { Package.AvailableAny(Builtins.add(@el, "bzum")) }, true) - - T(->() { Package.Installed("rpm") }, true) - T(->() { Package.Installed(@e) }, false) - T(->() { Package.Installed(@n) }, false) - - T(->() { Package.InstalledAll(["rpm", "glibc"]) }, true) - T(->() { Package.InstalledAll(["rpm", @e]) }, false) - T(->() { Package.InstalledAll(["rpm", @n]) }, false) - T(->() { Package.InstalledAll(@nl) }, false) - T(->() { Package.InstalledAll([]) }, true) - - T(->() { Package.InstalledAny(["rpm", "glibc"]) }, true) - T(->() { Package.InstalledAny(["rpm", @e]) }, true) - T(->() { Package.InstalledAny(["rpm", @n]) }, true) - T(->() { Package.InstalledAny(@el) }, false) - T(->() { Package.InstalledAny(@nl) }, false) - T(->() { Package.InstalledAny([]) }, false) - - T(->() { Package.DoInstall([@n]) }, false) - T(->() { Package.DoInstall([@e]) }, true) - T(->() { Package.Installed(@e) }, true) - - T(->() { Package.DoRemove([@n]) }, false) - T(->() { Package.DoRemove([@e]) }, true) - T(->() { Package.Installed(@e) }, false) - - Popup.AnyMessage( - "Package Testsuite", - Builtins.sformat( - "Number of Successes: %1\nNumber of Failures: %2", - @success, - @failure - ) - ) - - # EOF - - nil - end - - # testing function - def T(f, expect) - f = deep_copy(f) - r = Convert.to_boolean(Builtins.eval(f)) - if r != expect - Popup.Error( - Builtins.sformat("Failed: %1 = %2 (expected %3)", f, r, expect) - ) - Builtins.y2internal(1, "Failed: %1 = %2 (expected %3)", f, r, expect) - @failure = Ops.add(@failure, 1) - else - Builtins.y2security(1, "Passed: %1", f) - @success = Ops.add(@success, 1) - end - - nil - end - end -end - -Yast::PackagesTestClient.new.main diff --git a/library/packages/testsuite/tests/README b/library/packages/testsuite/tests/README deleted file mode 100644 index 0f17f374c..000000000 --- a/library/packages/testsuite/tests/README +++ /dev/null @@ -1,4 +0,0 @@ -There's an interactive test in ".../testsuite/packages-test.ycp", -run it as root with 'yast2 packages-test.ycp'. You need to NOT have -installed xntp-doc and mtx packages. There's a summary report at -the end of the test, look for <4> and <5> in the y2log for details. diff --git a/library/sequencer/Makefile.am b/library/sequencer/Makefile.am deleted file mode 100644 index b5f94253b..000000000 --- a/library/sequencer/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -# Makefile.am for yast2/library/sequencer - -SUBDIRS = src test testsuite diff --git a/library/sequencer/doc/examples/Makefile.am b/library/sequencer/doc/examples/Makefile.am deleted file mode 100644 index 517ecd511..000000000 --- a/library/sequencer/doc/examples/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# -# Makefile.am for yast2/sequencer/doc/examples -# - -htmldir = $(docdir)/sequencer/examples - -html_DATA = $(wildcard *.ycp) -EXTRA_DIST = $(html_DATA) diff --git a/library/sequencer/doc/images/Makefile.am b/library/sequencer/doc/images/Makefile.am deleted file mode 100644 index 93c60c8d4..000000000 --- a/library/sequencer/doc/images/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# -# Makefile.am for yast2/sequencer/doc/images -# - -htmldir = $(docdir)/sequencer/images - -html_DATA = $(wildcard *.png) -EXTRA_DIST = $(html_DATA) diff --git a/library/sequencer/src/Makefile.am b/library/sequencer/src/Makefile.am deleted file mode 100644 index 3be55b9e6..000000000 --- a/library/sequencer/src/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/Sequencer.rb - -yncludedir = @yncludedir@/wizard -ynclude_DATA = \ - include/wizard/sequencer.rb - -ylibdir = @ylibdir@/ui -ylib_DATA = \ - lib/ui/sequence.rb - -EXTRA_DIST = $(module_DATA) $(ynclude_DATA) $(ylib_DATA) - -include $(top_srcdir)/Makefile.am.common diff --git a/library/sequencer/test/Makefile.am b/library/sequencer/test/Makefile.am deleted file mode 100644 index e26b2257f..000000000 --- a/library/sequencer/test/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -TESTS = \ - sequence_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS) diff --git a/library/sequencer/testsuite/Makefile.am b/library/sequencer/testsuite/Makefile.am deleted file mode 100644 index 956c637e3..000000000 --- a/library/sequencer/testsuite/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -Y2BASEFLAGS = -I tests -export Y2BASEFLAGS - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff --git a/library/sequencer/testsuite/tests/README b/library/sequencer/testsuite/tests/README deleted file mode 100644 index c4ebe681e..000000000 --- a/library/sequencer/testsuite/tests/README +++ /dev/null @@ -1,12 +0,0 @@ -The wizard sequencer test cases -------------------------------- -0: general - -1: n,n,f -2: n,d,n,f -3: n,d,d,n,f -4: n,e,n,n,f - -5: b -6: n,b,b -7: n,n,b,b,b diff --git a/library/sequencer/testsuite/tests/WS_alias.err b/library/sequencer/testsuite/tests/WS_alias.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/WS_alias.out b/library/sequencer/testsuite/tests/WS_alias.out deleted file mode 100644 index dd1eacb09..000000000 --- a/library/sequencer/testsuite/tests/WS_alias.out +++ /dev/null @@ -1,13 +0,0 @@ -Log sequencer: Alias not found: blah -Return nil -Log sequencer: Alias not found: blah -Return nil -Log sequencer: Alias not found: 1 -Return nil -Return `func1 -Log sequencer: Invalid alias: [] -Return nil -Log sequencer: Invalid alias: nil -Return nil -Return `func2 -Return `func3 diff --git a/library/sequencer/testsuite/tests/WS_alias.rb b/library/sequencer/testsuite/tests/WS_alias.rb deleted file mode 100644 index b667590f6..000000000 --- a/library/sequencer/testsuite/tests/WS_alias.rb +++ /dev/null @@ -1,65 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class WSAliasClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Sequencer" - - @aliases = { - "1" => nil, - "2" => ->() { func1 }, - "3" => [], - "4" => [nil], - "5" => [->() { func2 }], - "6" => [->() { func3 }, :blah] - } - - TEST(->() { Sequencer.WS_alias({}, "blah") }, [], nil) - TEST(->() { Sequencer.WS_alias(@aliases, "blah") }, [], nil) - TEST(->() { Sequencer.WS_alias(@aliases, "1") }, [], nil) - TEST(->() { Builtins.eval(Sequencer.WS_alias(@aliases, "2")) }, [], nil) - TEST(->() { Sequencer.WS_alias(@aliases, "3") }, [], nil) - TEST(->() { Sequencer.WS_alias(@aliases, "4") }, [], nil) - TEST(->() { Builtins.eval(Sequencer.WS_alias(@aliases, "5")) }, [], nil) - TEST(->() { Builtins.eval(Sequencer.WS_alias(@aliases, "6")) }, [], nil) - - nil - end - - def func1 - :func1 - end - - def func2 - :func2 - end - - def func3 - :func3 - end - end -end - -Yast::WSAliasClient.new.main diff --git a/library/sequencer/testsuite/tests/WS_check.err b/library/sequencer/testsuite/tests/WS_check.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/WS_check.out b/library/sequencer/testsuite/tests/WS_check.out deleted file mode 100644 index ff1c523fb..000000000 --- a/library/sequencer/testsuite/tests/WS_check.out +++ /dev/null @@ -1,16 +0,0 @@ -Log sequencer check: ws_start needs to be defined -Return false -Log sequencer check: list size too small: 0 (key: 2) -Log sequencer check: list size too small: 1 (key: 3) -Log sequencer check: not a boolean: `x -Log sequencer check: not a boolean: 5 -Log sequencer check: not a string: `x -Log sequencer check: alias not found: 0 -Log sequencer check: not a map: 8 [] -Log sequencer check: not a symbol: blah -Log sequencer check: alias not found: huu -Log sequencer check: alias not found: missing -Log sequencer check: alias not used: 7 -Return false -Return true -Return true diff --git a/library/sequencer/testsuite/tests/WS_check.rb b/library/sequencer/testsuite/tests/WS_check.rb deleted file mode 100644 index eff8ab0bd..000000000 --- a/library/sequencer/testsuite/tests/WS_check.rb +++ /dev/null @@ -1,102 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class WSCheckClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Sequencer" - - @aliases1 = { - :x => "x", - "1" => "1", - "2" => [], - "3" => [->() { f1 }], - "4" => ["4", :x], - "5" => [->() { f2 }, "5"], - "6" => [->() { f3 }, true], - "7" => [->() { f4 }, false], - "8" => ->() { f5 }, - "9" => ->() { f6 }, - "A" => ->() { f7 } - } - - @sequence1 = { - "ws_start" => "missing", - "0" => {}, - "8" => [], - "9" => {}, - "A" => { "blah" => :back, :next => "huu", :finish => :ok }, - :x => {}, - "1" => {}, - "2" => {}, - "3" => {}, - "4" => {}, - "5" => {}, - "6" => {} - } - - TEST(->() { Sequencer.WS_check({}, {}) }, [], nil) - TEST(->() { Sequencer.WS_check(@aliases1, @sequence1) }, [], nil) - - TEST(->() { Sequencer.WS_check({}, "ws_start" => :ws_finish) }, [], nil) - - @clicks = nil - @cur = -1 - Yast.include self, "Wizard.rb" - TEST(->() { Sequencer.WS_check(aliases, sequence) }, [], nil) - - nil - end - - def f1 - "1" - end - - def f2 - 2 - end - - def f3 - :id3 - end - - def f4 - 1 - end - - def f5 - 1 - end - - def f6 - 1 - end - - def f7 - 1 - end - end -end - -Yast::WSCheckClient.new.main diff --git a/library/sequencer/testsuite/tests/WS_error.err b/library/sequencer/testsuite/tests/WS_error.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/WS_error.out b/library/sequencer/testsuite/tests/WS_error.out deleted file mode 100644 index 368c4666c..000000000 --- a/library/sequencer/testsuite/tests/WS_error.out +++ /dev/null @@ -1,2 +0,0 @@ -Log sequencer: testsuite message -Return nil diff --git a/library/sequencer/testsuite/tests/WS_error.rb b/library/sequencer/testsuite/tests/WS_error.rb deleted file mode 100644 index 84d7c4d82..000000000 --- a/library/sequencer/testsuite/tests/WS_error.rb +++ /dev/null @@ -1,37 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class WSErrorClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Sequencer" - - TEST(->() { Sequencer.WS_error("testsuite message") }, [], nil) - - nil - end - end -end - -Yast::WSErrorClient.new.main diff --git a/library/sequencer/testsuite/tests/WS_next.err b/library/sequencer/testsuite/tests/WS_next.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/WS_next.out b/library/sequencer/testsuite/tests/WS_next.out deleted file mode 100644 index 3c0d27a1c..000000000 --- a/library/sequencer/testsuite/tests/WS_next.out +++ /dev/null @@ -1,13 +0,0 @@ -Log sequencer: Current not found: blah -Return nil -Log sequencer: Current not found: blah -Return nil -Log sequencer: Symbol not found: `id3 -Return nil -Log sequencer: Symbol not found: `id3 -Return nil -Log sequencer: Symbol not found: `id3 -Return nil -Return config -Return end -Return `ws_finish diff --git a/library/sequencer/testsuite/tests/WS_next.rb b/library/sequencer/testsuite/tests/WS_next.rb deleted file mode 100644 index 231247f6a..000000000 --- a/library/sequencer/testsuite/tests/WS_next.rb +++ /dev/null @@ -1,69 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class WSNextClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Sequencer" - - @aliases = { "1" => ->() { f1 }, "2" => ->() { f2 }, "3" => lambda do - f3 - end } - - @sequence = { - "ws_start" => "begin", - "begin" => { next: "decide" }, - "config" => { next: "end" }, - "decide" => { no: "end", yes: "config" }, - "end" => { finish: :ws_finish } - } - - TEST(->() { Sequencer.WS_next({}, "blah", :id3) }, [], nil) - TEST(->() { Sequencer.WS_next(@sequence, "blah", :id3) }, [], nil) - TEST(->() { Sequencer.WS_next(@sequence, "begin", :id3) }, [], nil) - TEST(->() { Sequencer.WS_next(@sequence, "begin", :id3) }, [], nil) - TEST(->() { Sequencer.WS_next(@sequence, "begin", :id3) }, [], nil) - # TEST(``(Sequencer::WS_next(sequence, "ws_start", `next)), [], nil); - TEST(->() { Sequencer.WS_next(@sequence, "decide", :yes) }, [], nil) - TEST(->() { Sequencer.WS_next(@sequence, "decide", :no) }, [], nil) - TEST(->() { Sequencer.WS_next(@sequence, "end", :finish) }, [], nil) - - nil - end - - def f1 - "1" - end - - def f2 - 2 - end - - def f3 - :id3 - end - end -end - -Yast::WSNextClient.new.main diff --git a/library/sequencer/testsuite/tests/WS_pop.err b/library/sequencer/testsuite/tests/WS_pop.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/WS_pop.out b/library/sequencer/testsuite/tests/WS_pop.out deleted file mode 100644 index 310eea7fe..000000000 --- a/library/sequencer/testsuite/tests/WS_pop.out +++ /dev/null @@ -1,5 +0,0 @@ -Return nil -Return nil -Return nil -Return [[1], 1] -Return [[1, 3, 5, 7, 9], 9] diff --git a/library/sequencer/testsuite/tests/WS_pop.rb b/library/sequencer/testsuite/tests/WS_pop.rb deleted file mode 100644 index 51ed6ecf8..000000000 --- a/library/sequencer/testsuite/tests/WS_pop.rb +++ /dev/null @@ -1,41 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class WSPopClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Sequencer" - - TEST(->() { Sequencer.WS_pop(nil) }, [], nil) - TEST(->() { Sequencer.WS_pop([]) }, [], nil) - TEST(->() { Sequencer.WS_pop([1]) }, [], nil) - TEST(->() { Sequencer.WS_pop([1, 3]) }, [], nil) - TEST(->() { Sequencer.WS_pop([1, 3, 5, 7, 9, 11]) }, [], nil) - - nil - end - end -end - -Yast::WSPopClient.new.main diff --git a/library/sequencer/testsuite/tests/WS_push.err b/library/sequencer/testsuite/tests/WS_push.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/WS_push.out b/library/sequencer/testsuite/tests/WS_push.out deleted file mode 100644 index 0e2ca2cb4..000000000 --- a/library/sequencer/testsuite/tests/WS_push.out +++ /dev/null @@ -1,4 +0,0 @@ -Return nil -Return [4] -Return [1, 3, 5, 7, 9, 11, 4] -Return [1, 3, 5, 7] diff --git a/library/sequencer/testsuite/tests/WS_push.rb b/library/sequencer/testsuite/tests/WS_push.rb deleted file mode 100644 index fe53f6fed..000000000 --- a/library/sequencer/testsuite/tests/WS_push.rb +++ /dev/null @@ -1,40 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class WSPushClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Sequencer" - - TEST(->() { Sequencer.WS_push(nil, 4) }, [], nil) - TEST(->() { Sequencer.WS_push([], 4) }, [], nil) - TEST(->() { Sequencer.WS_push([1, 3, 5, 7, 9, 11], 4) }, [], nil) - TEST(->() { Sequencer.WS_push([1, 3, 5, 7, 9, 11], 7) }, [], nil) - - nil - end - end -end - -Yast::WSPushClient.new.main diff --git a/library/sequencer/testsuite/tests/WS_run.err b/library/sequencer/testsuite/tests/WS_run.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/WS_run.out b/library/sequencer/testsuite/tests/WS_run.out deleted file mode 100644 index d1b6f9325..000000000 --- a/library/sequencer/testsuite/tests/WS_run.out +++ /dev/null @@ -1,11 +0,0 @@ -Log sequencer: Alias not found: blah -Log sequencer: Bad id: blah -Return nil -Log sequencer: Alias not found: blah -Log sequencer: Bad id: blah -Return nil -Log sequencer: Returned value not symbol: 1 -Return nil -Log sequencer: Returned value not symbol: 2 -Return nil -Return `id3 diff --git a/library/sequencer/testsuite/tests/WS_run.rb b/library/sequencer/testsuite/tests/WS_run.rb deleted file mode 100644 index 24f6da353..000000000 --- a/library/sequencer/testsuite/tests/WS_run.rb +++ /dev/null @@ -1,57 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class WSRunClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Sequencer" - - @aliases = { "1" => ->() { f1 }, "2" => ->() { f2 }, "3" => lambda do - f3 - end } - - TEST(->() { Sequencer.WS_run({}, "blah") }, [], nil) - TEST(->() { Sequencer.WS_run(@aliases, "blah") }, [], nil) - TEST(->() { Sequencer.WS_run(@aliases, "1") }, [], nil) - TEST(->() { Sequencer.WS_run(@aliases, "2") }, [], nil) - TEST(->() { Sequencer.WS_run(@aliases, "3") }, [], nil) - - nil - end - - def f1 - "1" - end - - def f2 - 2 - end - - def f3 - :id3 - end - end -end - -Yast::WSRunClient.new.main diff --git a/library/sequencer/testsuite/tests/WS_special.err b/library/sequencer/testsuite/tests/WS_special.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/WS_special.out b/library/sequencer/testsuite/tests/WS_special.out deleted file mode 100644 index 85f7a3e60..000000000 --- a/library/sequencer/testsuite/tests/WS_special.out +++ /dev/null @@ -1,5 +0,0 @@ -Return false -Return false -Return true -Log sequencer: Alias not found: missing -Return nil diff --git a/library/sequencer/testsuite/tests/WS_special.rb b/library/sequencer/testsuite/tests/WS_special.rb deleted file mode 100644 index 68efec42f..000000000 --- a/library/sequencer/testsuite/tests/WS_special.rb +++ /dev/null @@ -1,58 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class WSSpecialClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Sequencer" - - @Aliases = { - "normal" => ->() { Normal() }, - "special_n" => [->() { SpecialN() }, false], - "special_y" => [->() { SpecialY() }, true] - } - - TEST(->() { Sequencer.WS_special(@Aliases, "normal") }, [], nil) - TEST(->() { Sequencer.WS_special(@Aliases, "special_n") }, [], nil) - TEST(->() { Sequencer.WS_special(@Aliases, "special_y") }, [], nil) - TEST(->() { Sequencer.WS_special(@Aliases, "missing") }, [], nil) - - nil - end - - def Normal - 1 - end - - def SpecialN - 1 - end - - def SpecialY - 1 - end - end -end - -Yast::WSSpecialClient.new.main diff --git a/library/sequencer/testsuite/tests/WS_testall.err b/library/sequencer/testsuite/tests/WS_testall.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/WS_testall.out b/library/sequencer/testsuite/tests/WS_testall.out deleted file mode 100644 index d0674dd8a..000000000 --- a/library/sequencer/testsuite/tests/WS_testall.out +++ /dev/null @@ -1,2 +0,0 @@ -Return [] -Return ["1", 2, `id3] diff --git a/library/sequencer/testsuite/tests/WS_testall.rb b/library/sequencer/testsuite/tests/WS_testall.rb deleted file mode 100644 index ae6f1ef02..000000000 --- a/library/sequencer/testsuite/tests/WS_testall.rb +++ /dev/null @@ -1,54 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class WSTestallClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Sequencer" - - @aliases = { "1" => ->() { f1 }, "2" => ->() { f2 }, "3" => lambda do - f3 - end } - - TEST(->() { Sequencer.WS_testall({}) }, [], nil) - TEST(->() { Sequencer.WS_testall(@aliases) }, [], nil) - - nil - end - - def f1 - "1" - end - - def f2 - 2 - end - - def f3 - :id3 - end - end -end - -Yast::WSTestallClient.new.main diff --git a/library/sequencer/testsuite/tests/Wizard.rb b/library/sequencer/testsuite/tests/Wizard.rb deleted file mode 100644 index a6289ff5f..000000000 --- a/library/sequencer/testsuite/tests/Wizard.rb +++ /dev/null @@ -1,137 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - module WizardInclude - def initialize_Wizard(include_target) - Yast.include include_target, "testsuite.rb" - Yast.import "Sequencer" - Sequencer.docheck = false - - TEST(->() { Sequencer.Run(aliases, sequence) }, [], nil) if @cur != -1 - end - - def ok - Builtins.y2error("ok") - :ok - end - - def back - Builtins.y2error("back") - :back - end - - def next - Builtins.y2error("next") - :next - end - - def finish - Builtins.y2error("finish") - :finish - end - - def details - Builtins.y2error("details") - :details - end - - def expert - Builtins.y2error("expert") - :expert - end - - # define boolean WS_check(map aliases, map sequence) ``{ return true; } - - # integer cur = 0; - # list clicks = [ `next, `next, `details, `ok, `next ]; - # list clicks = [ `n, `n, `d, `o, `n]; - def click - ret = nil - s = Builtins.size(@clicks) - if Ops.less_than(@cur, s) && Ops.is_symbol?(Ops.get(@clicks, @cur)) - ret = Ops.get_symbol(@clicks, @cur) - end - @cur = Ops.add(@cur, 1) - log = Builtins.sformat("%1", ret) - if Builtins.substring(log, 0, 1) == "`" - log = Builtins.substring(log, 1, Builtins.size(log)) - end - Builtins.y2error("%1", log) - ret - end - - # sequence = sequence(); - # cur = lookup(sequnce,"ws_start"); - # define any clickng() ``{ - # any ret = lookup(sequence,cur,$[]); - # list l = mapkeys(ret); - # integer i = random(size(l)+1); - # if(i ->() { click }, - "config" => ->() { click }, - "end" => ->() { click }, - "expert" => ->() { click }, - "expert2" => ->() { click }, - "details" => ->() { click }, - "superdetails" => ->() { click } - } - end - - # example5.ycp sequence - def sequence - { - "ws_start" => "begin", - "begin" => { next: "config" }, - "expert" => { next: "expert2" }, - "expert2" => { next: "end", ok: "config" }, - "config" => { - next: "end", - details: "details", - expert: "expert" - }, - "details" => { - next: "end", - details: "superdetails", - ok: "config" - }, - "superdetails" => { next: "end", ok: "details" }, - "end" => { finish: :ws_finish } - } - end - end -end diff --git a/library/sequencer/testsuite/tests/Wizard0.err b/library/sequencer/testsuite/tests/Wizard0.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/Wizard0.out b/library/sequencer/testsuite/tests/Wizard0.out deleted file mode 100644 index 94905639c..000000000 --- a/library/sequencer/testsuite/tests/Wizard0.out +++ /dev/null @@ -1,15 +0,0 @@ -Log sequencer: Starting dialog not found -Return nil -Log sequencer: Starting dialog not found -Return nil -Log sequencer: Starting dialog not found -Return nil -Log sequencer: Starting dialog not found -Return nil -Log sequencer: Alias not found: 0 -Log sequencer: Bad id: 0 -Log sequencer: Invalid ret: nil -Return nil -Log sequencer: Starting dialog not found -Return nil -Return `ok diff --git a/library/sequencer/testsuite/tests/Wizard0.rb b/library/sequencer/testsuite/tests/Wizard0.rb deleted file mode 100644 index 14d640305..000000000 --- a/library/sequencer/testsuite/tests/Wizard0.rb +++ /dev/null @@ -1,55 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class Wizard0Client < Client - def main - @clicks = nil - @cur = -1 - Yast.include self, "Wizard.rb" - - @Aliases = { "0" => ->() { next }, "1" => ->() { next }, "F" => lambda do - finish - end } - - @Sequence = { - "ws_start" => "0", - "0" => { next: "1" }, - "1" => { next: "F" }, - "F" => { finish: :ws_finish } - } - - TEST(->() { Sequencer.Run(nil, nil) }, [], nil) - TEST(->() { Sequencer.Run({}, {}) }, [], nil) - TEST(->() { Sequencer.Run({}, nil) }, [], nil) - TEST(->() { Sequencer.Run(nil, {}) }, [], nil) - TEST(->() { Sequencer.Run({}, @Sequence) }, [], nil) - TEST(->() { Sequencer.Run(@Aliases, {}) }, [], nil) - TEST(->() { Sequencer.Run({}, "ws_start" => :ok) }, [], nil) - - nil - end - end -end - -Yast::Wizard0Client.new.main diff --git a/library/sequencer/testsuite/tests/Wizard1.err b/library/sequencer/testsuite/tests/Wizard1.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/Wizard1.out b/library/sequencer/testsuite/tests/Wizard1.out deleted file mode 100644 index 69a12fc03..000000000 --- a/library/sequencer/testsuite/tests/Wizard1.out +++ /dev/null @@ -1,4 +0,0 @@ -Log next -Log next -Log finish -Return `ws_finish diff --git a/library/sequencer/testsuite/tests/Wizard1.rb b/library/sequencer/testsuite/tests/Wizard1.rb deleted file mode 100644 index d53b4cad4..000000000 --- a/library/sequencer/testsuite/tests/Wizard1.rb +++ /dev/null @@ -1,36 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class Wizard1Client < Client - def main - @cur = 0 - @clicks = [:next, :next, :finish] - Yast.include self, "Wizard.rb" - - nil - end - end -end - -Yast::Wizard1Client.new.main diff --git a/library/sequencer/testsuite/tests/Wizard2.err b/library/sequencer/testsuite/tests/Wizard2.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/Wizard2.out b/library/sequencer/testsuite/tests/Wizard2.out deleted file mode 100644 index f94bcee1b..000000000 --- a/library/sequencer/testsuite/tests/Wizard2.out +++ /dev/null @@ -1,5 +0,0 @@ -Log next -Log details -Log next -Log finish -Return `ws_finish diff --git a/library/sequencer/testsuite/tests/Wizard2.rb b/library/sequencer/testsuite/tests/Wizard2.rb deleted file mode 100644 index 3f9096461..000000000 --- a/library/sequencer/testsuite/tests/Wizard2.rb +++ /dev/null @@ -1,36 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class Wizard2Client < Client - def main - @cur = 0 - @clicks = [:next, :details, :next, :finish] - Yast.include self, "Wizard.rb" - - nil - end - end -end - -Yast::Wizard2Client.new.main diff --git a/library/sequencer/testsuite/tests/Wizard3.err b/library/sequencer/testsuite/tests/Wizard3.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/Wizard3.out b/library/sequencer/testsuite/tests/Wizard3.out deleted file mode 100644 index 3b8f2be2d..000000000 --- a/library/sequencer/testsuite/tests/Wizard3.out +++ /dev/null @@ -1,6 +0,0 @@ -Log next -Log details -Log details -Log next -Log finish -Return `ws_finish diff --git a/library/sequencer/testsuite/tests/Wizard3.rb b/library/sequencer/testsuite/tests/Wizard3.rb deleted file mode 100644 index 6d9edc91e..000000000 --- a/library/sequencer/testsuite/tests/Wizard3.rb +++ /dev/null @@ -1,36 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class Wizard3Client < Client - def main - @cur = 0 - @clicks = [:next, :details, :details, :next, :finish] - Yast.include self, "Wizard.rb" - - nil - end - end -end - -Yast::Wizard3Client.new.main diff --git a/library/sequencer/testsuite/tests/Wizard4.err b/library/sequencer/testsuite/tests/Wizard4.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/Wizard4.out b/library/sequencer/testsuite/tests/Wizard4.out deleted file mode 100644 index 8f7e3f411..000000000 --- a/library/sequencer/testsuite/tests/Wizard4.out +++ /dev/null @@ -1,6 +0,0 @@ -Log next -Log expert -Log next -Log next -Log finish -Return `ws_finish diff --git a/library/sequencer/testsuite/tests/Wizard4.rb b/library/sequencer/testsuite/tests/Wizard4.rb deleted file mode 100644 index 7b812ae24..000000000 --- a/library/sequencer/testsuite/tests/Wizard4.rb +++ /dev/null @@ -1,36 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class Wizard4Client < Client - def main - @cur = 0 - @clicks = [:next, :expert, :next, :next, :finish] - Yast.include self, "Wizard.rb" - - nil - end - end -end - -Yast::Wizard4Client.new.main diff --git a/library/sequencer/testsuite/tests/Wizard5.err b/library/sequencer/testsuite/tests/Wizard5.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/Wizard5.out b/library/sequencer/testsuite/tests/Wizard5.out deleted file mode 100644 index 590e1eaff..000000000 --- a/library/sequencer/testsuite/tests/Wizard5.out +++ /dev/null @@ -1,2 +0,0 @@ -Log back -Return `back diff --git a/library/sequencer/testsuite/tests/Wizard5.rb b/library/sequencer/testsuite/tests/Wizard5.rb deleted file mode 100644 index 2d4a68004..000000000 --- a/library/sequencer/testsuite/tests/Wizard5.rb +++ /dev/null @@ -1,36 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class Wizard5Client < Client - def main - @cur = 0 - @clicks = [:back] - Yast.include self, "Wizard.rb" - - nil - end - end -end - -Yast::Wizard5Client.new.main diff --git a/library/sequencer/testsuite/tests/Wizard6.err b/library/sequencer/testsuite/tests/Wizard6.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/Wizard6.out b/library/sequencer/testsuite/tests/Wizard6.out deleted file mode 100644 index 697ed844a..000000000 --- a/library/sequencer/testsuite/tests/Wizard6.out +++ /dev/null @@ -1,4 +0,0 @@ -Log next -Log back -Log back -Return `back diff --git a/library/sequencer/testsuite/tests/Wizard6.rb b/library/sequencer/testsuite/tests/Wizard6.rb deleted file mode 100644 index 23b0c4dbd..000000000 --- a/library/sequencer/testsuite/tests/Wizard6.rb +++ /dev/null @@ -1,36 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class Wizard6Client < Client - def main - @cur = 0 - @clicks = [:next, :back, :back] - Yast.include self, "Wizard.rb" - - nil - end - end -end - -Yast::Wizard6Client.new.main diff --git a/library/sequencer/testsuite/tests/Wizard7.err b/library/sequencer/testsuite/tests/Wizard7.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/sequencer/testsuite/tests/Wizard7.out b/library/sequencer/testsuite/tests/Wizard7.out deleted file mode 100644 index 4157a55dc..000000000 --- a/library/sequencer/testsuite/tests/Wizard7.out +++ /dev/null @@ -1,6 +0,0 @@ -Log next -Log next -Log back -Log back -Log back -Return `back diff --git a/library/sequencer/testsuite/tests/Wizard7.rb b/library/sequencer/testsuite/tests/Wizard7.rb deleted file mode 100644 index b445d1d78..000000000 --- a/library/sequencer/testsuite/tests/Wizard7.rb +++ /dev/null @@ -1,36 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class Wizard7Client < Client - def main - @cur = 0 - @clicks = [:next, :next, :back, :back, :back] - Yast.include self, "Wizard.rb" - - nil - end - end -end - -Yast::Wizard7Client.new.main diff --git a/library/system/Makefile.am b/library/system/Makefile.am deleted file mode 100644 index 4483cdb77..000000000 --- a/library/system/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -# Makefile.am for yast2/library/system - -SUBDIRS = src testsuite test diff --git a/library/system/src/Makefile.am b/library/system/src/Makefile.am deleted file mode 100644 index e22bf1371..000000000 --- a/library/system/src/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/Hotplug.rb \ - modules/Initrd.rb \ - modules/ModuleLoading.rb \ - modules/FileChanges.rb \ - modules/ModulesConf.rb \ - modules/Kernel.rb \ - modules/HWConfig.rb \ - modules/HwStatus.rb - -client_DATA = \ - clients/view_anymsg.rb - -yncludedir = @yncludedir@/hwinfo -ynclude_DATA = \ - include/hwinfo/classnames.rb - -scrconf_DATA = \ - scrconf/cfg_hardware.scr \ - scrconf/proc_cpuinfo.scr \ - scrconf/boot_vmlinuz_version.scr \ - scrconf/cfg_kernel.scr \ - scrconf/proc_cmdline.scr - -desktop_DATA = \ - desktop/messages.desktop - -ylibdir = @ylibdir@/yast2 -ylib_DATA = \ - lib/yast2/execute.rb \ - lib/yast2/hw_detection.rb \ - lib/yast2/fs_snapshot.rb \ - lib/yast2/fs_snapshot_store.rb \ - lib/yast2/target_file.rb \ - lib/yast2/system_time.rb - -ylibclientsdir = @ylibdir@/yast2/clients -ylibclients_DATA = \ - lib/yast2/clients/view_anymsg.rb - - - - -EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA) $(desktop_DATA) $(ylib_DATA) $(ylibclients_DATA) - -include $(top_srcdir)/Makefile.am.common diff --git a/library/system/test/Makefile.am b/library/system/test/Makefile.am deleted file mode 100644 index 58867fac5..000000000 --- a/library/system/test/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -TESTS = \ - clients/view_anymsg_test.rb \ - execute_test.rb \ - kernel_test.rb \ - hw_detection_test.rb \ - fs_snapshot_test.rb \ - fs_snapshot_store_test.rb \ - proc_cmdline_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS) diff --git a/library/system/testsuite/Makefile.am b/library/system/testsuite/Makefile.am deleted file mode 100644 index e85fbc827..000000000 --- a/library/system/testsuite/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff --git a/library/system/testsuite/tests/filechanges.err b/library/system/testsuite/tests/filechanges.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/system/testsuite/tests/filechanges.out b/library/system/testsuite/tests/filechanges.out deleted file mode 100644 index 71e0bb1b4..000000000 --- a/library/system/testsuite/tests/filechanges.out +++ /dev/null @@ -1,5 +0,0 @@ -Return true -Return true -Return false -Return true -Return true diff --git a/library/system/testsuite/tests/filechanges.rb b/library/system/testsuite/tests/filechanges.rb deleted file mode 100644 index 420cf9629..000000000 --- a/library/system/testsuite/tests/filechanges.rb +++ /dev/null @@ -1,140 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: -# filechanges.ycp -# -# Module: -# Base -# -# Summary: -# testsuite for filechanges module -# -# Authors: -# Jiri Srain -# -# $Id: kernel.ycp 26253 2005-11-22 14:59:29Z lslezak $ -# - -# testedfiles: Kernel.ycp Testsuite.ycp -module Yast - class FilechangesClient < Client - def main - Yast.include self, "testsuite.rb" - - # minimal "don't care" SCR data to work with the constructor - @READ = { - "target" => { - "string" => "", - "tmpdir" => "/tmp", - "size" => 5, - "ycp" => {} - } - } - @WRITE = {} - @EXECL = [ - { - "target" => { - "bash_output" => { - "exit" => 0, - "stdout" => "ntp.rpm", - "stderr" => "" - } - } - }, - { - "target" => { - "bash_output" => { - "exit" => 0, - "stdout" => "S.?....T /etc/ntp.conf\n..?..... c /var/lib/ntp/etc/ntp.conf.iburst", - "stderr" => "" - } - } - } - ] - - TESTSUITE_INIT([@READ, {}, {}], 0) - - Yast.import "FileChanges" - Yast.import "Mode" - - Mode.SetTest("testsuite") - TEST(->() { FileChanges.FileChanged("/etc/ntp.conf") }, - [ - @READ, - @WRITE, - @EXECL - ], nil) - Ops.set(@READ, ["target", "ycp", "/etc/ntp.conf"], "incorrect checksum") - @EXEC = { - "target" => { - "bash_output" => { - "exit" => "0", - "stdout" => "f210720e1362615ac0ecc544b35abb73 /etc/ntp.conf" - } - } - } - - TEST(->() { FileChanges.FileChanged("/etc/ntp.conf") }, - [ - @READ, - @WRITE, - @EXEC - ], nil) - Ops.set( - @READ, - ["target", "ycp", "/etc/ntp.conf"], - "f210720e1362615ac0ecc544b35abb73 /etc/ntp.conf" - ) - TEST(->() { FileChanges.FileChanged("/etc/ntp.conf") }, - [ - @READ, - @WRITE, - @EXEC - ], nil) - - TEST(->() { FileChanges.CheckNewCreatedFiles([]) }, - [ - @READ, - @WRITE, - @EXEC - ], true) - - Ops.set( - @READ, - ["target", "stat", "/var/lib/YaST2/filechecks_non_verbose"], - {} - ) - TEST(->() { FileChanges.CheckNewCreatedFiles(["/etc/apache2/vhosts.d/vhost1"]) }, - [ - @READ, - @WRITE, - @EXEC - ], true) - - nil - end - end -end - -Yast::FilechangesClient.new.main diff --git a/library/system/testsuite/tests/initrd.err b/library/system/testsuite/tests/initrd.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/system/testsuite/tests/initrd.out b/library/system/testsuite/tests/initrd.out deleted file mode 100644 index d81c8bc1e..000000000 --- a/library/system/testsuite/tests/initrd.out +++ /dev/null @@ -1,66 +0,0 @@ -Read .target.size "/etc/sysconfig/kernel" 0 -Read .sysconfig.kernel.INITRD_MODULES "reiserfs lvmmod" -Return ["reiserfs", "lvmmod"] -Dump Now reseting -Return nil -Dump Reading again -Read .target.size "/etc/sysconfig/kernel" 0 -Read .sysconfig.kernel.INITRD_MODULES "reiserfs lvmmod" -Return ["reiserfs", "lvmmod"] -Dump Reseting again -Return nil -Dump Adding ne2k -Log Initrd.AddModule() is deprecated, do not use (sysconfig.kernel.INITRD_MODULES is not written anymore, see bnc#895084) -Read .target.size "/etc/sysconfig/kernel" 0 -Read .sysconfig.kernel.INITRD_MODULES "reiserfs lvmmod" -Return nil -Return ["reiserfs", "lvmmod", "ne2k"] -Dump Removing lvmmod -Return nil -Return ["reiserfs", "ne2k"] -Dump Writing -Write .modules.options."ne2k" $["io":"0x300,", "irq":"5"] true -Write .modules nil true -Read .target.size "/etc/sysconfig/kernel" 0 -Read .sysconfig.kernel.INITRD_MODULES "reiserfs lvmmod" -Execute .target.bash "/usr/bin/touch /etc/sysconfig/bootloader" 0 -Log Ignoring configured kernel modules: reiserfs ne2k -Execute .target.bash "/sbin/mkinitrd >> /var/log/YaST2/y2logmkinitrd 2>&1" 0 -Return true -Dump Importing with filtered module -Read .target.size "/etc/sysconfig/kernel" 0 -Read .sysconfig.kernel.INITRD_MODULES "reiserfs lvmmod" -Return nil -Dump Writing -Read .target.size "/etc/sysconfig/kernel" 0 -Read .sysconfig.kernel.INITRD_MODULES "reiserfs lvmmod" -Execute .target.bash "/usr/bin/touch /etc/sysconfig/bootloader" 0 -Log Ignoring configured kernel modules: ne2k xfs_dmapi xfs_support lvmmod -Execute .target.bash "/sbin/mkinitrd >> /var/log/YaST2/y2logmkinitrd 2>&1" 0 -Return true -Dump Setting Mode::Update -Dump Importing with filtered module -Read .target.size "/etc/sysconfig/kernel" 0 -Read .sysconfig.kernel.INITRD_MODULES "reiserfs lvmmod" -Return nil -Return ["ne2k", "xfs_dmapi", "xfs_support", "lvmmod"] -Dump Writing -Read .target.size "/etc/sysconfig/kernel" 0 -Read .sysconfig.kernel.INITRD_MODULES "reiserfs lvmmod" -Execute .target.bash "/usr/bin/touch /etc/sysconfig/bootloader" 0 -Log Ignoring configured kernel modules: ne2k lvmmod -Execute .target.bash "/sbin/mkinitrd >> /var/log/YaST2/y2logmkinitrd 2>&1" 0 -Return true -Dump Resetting for installation test -Return nil -Return nil -Return nil -Dump Testing keeping installation order -Log Initrd.AddModule() is deprecated, do not use (sysconfig.kernel.INITRD_MODULES is not written anymore, see bnc#895084) -Read .etc.install_inf.InitrdModules "driver1 driver2 driver3" -Return nil -Log Initrd.AddModule() is deprecated, do not use (sysconfig.kernel.INITRD_MODULES is not written anymore, see bnc#895084) -Return nil -Log Initrd.AddModule() is deprecated, do not use (sysconfig.kernel.INITRD_MODULES is not written anymore, see bnc#895084) -Return nil -Return ["driver2", "driver3", "ne2k"] diff --git a/library/system/testsuite/tests/initrd.rb b/library/system/testsuite/tests/initrd.rb deleted file mode 100644 index 88c5bddf6..000000000 --- a/library/system/testsuite/tests/initrd.rb +++ /dev/null @@ -1,132 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: -# initrd.ycp -# -# Module: -# Bootloader -# -# Summary: -# testsuite for initrd module -# -# Authors: -# Jiri Srain -# -# $Id$ -# - -# testedfiles: Initrd.ycp Testsuite.ycp -module Yast - class InitrdClient < Client - def main - Yast.include self, "testsuite.rb" - - # minimal "don't care" SCR data to work with the constructor - @READ = { - "sysconfig" => { "kernel" => { "INITRD_MODULES" => "reiserfs lvmmod" } }, - "probe" => { - "architecture" => "i386", - "has_pcmcia" => false, - "has_smp" => false, - "system" => nil, - "is_uml" => false - }, - "target" => { "string" => "", "tmpdir" => "/tmp" }, - "etc" => { - "install_inf" => { - "InstMode" => "", - "InitrdModules" => "driver1 driver2 driver3" - } - } - } - - TESTSUITE_INIT([@READ, {}, {}], 0) - - Yast.import "Initrd" - Yast.import "Mode" - Yast.import "Stage" - - TEST(->() { Initrd.ListModules }, [@READ, {}, {}], 0) - DUMP("Now reseting") - TEST(->() { Initrd.Reset }, [@READ, {}, {}], 0) - DUMP("Reading again") - TEST(->() { Initrd.ListModules }, [@READ, {}, {}], 0) - DUMP("Reseting again") - TEST(->() { Initrd.Reset }, [@READ, {}, {}], 0) - DUMP("Adding ne2k") - TEST(->() { Initrd.AddModule("ne2k", "io=0x300, irq=5") }, - [ - @READ, - {}, - {} - ], 0) - TEST(->() { Initrd.ListModules }, [@READ, {}, {}], 0) - DUMP("Removing lvmmod") - TEST(->() { Initrd.RemoveModule("lvmmod") }, [@READ, {}, {}], 0) - TEST(->() { Initrd.ListModules }, [@READ, {}, {}], 0) - DUMP("Writing") - TEST(->() { Initrd.Write }, [@READ, {}, {}], 0) - DUMP("Importing with filtered module") - TEST(lambda do - Initrd.Import( - "list" => ["ne2k", "xfs_dmapi", "xfs_support", "lvmmod"] - ) - end, [ - @READ, - {}, - {} - ], 0) - DUMP("Writing") - TEST(->() { Initrd.Write }, [@READ, {}, {}], 0) - DUMP("Setting Mode::Update") - Mode.SetMode("update") - DUMP("Importing with filtered module") - TEST(lambda do - Initrd.Import( - "list" => ["ne2k", "xfs_dmapi", "xfs_support", "lvmmod"] - ) - end, [ - @READ, - {}, - {} - ], 0) - TEST(->() { Initrd.ListModules }, [@READ, {}, {}], 0) - DUMP("Writing") - TEST(->() { Initrd.Write }, [@READ, {}, {}], 0) - DUMP("Resetting for installation test") - TEST(->() { Stage.Set("initial") }, [@READ, {}, {}], 0) - TEST(->() { Mode.SetMode("installation") }, [@READ, {}, {}], 0) - TEST(->() { Initrd.Reset }, [@READ, {}, {}], 0) - DUMP("Testing keeping installation order") - TEST(->() { Initrd.AddModule("ne2k", "") }, [@READ, {}, {}], 0) - TEST(->() { Initrd.AddModule("driver3", "") }, [@READ, {}, {}], 0) - TEST(->() { Initrd.AddModule("driver2", "") }, [@READ, {}, {}], 0) - TEST(->() { Initrd.ListModules }, [@READ, {}, {}], 0) - - nil - end - end -end - -Yast::InitrdClient.new.main diff --git a/library/system/testsuite/tests/kernel.err b/library/system/testsuite/tests/kernel.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/system/testsuite/tests/kernel.out b/library/system/testsuite/tests/kernel.out deleted file mode 100644 index 62d9a1689..000000000 --- a/library/system/testsuite/tests/kernel.out +++ /dev/null @@ -1,6 +0,0 @@ -Dump ---------------------------------------- -Return nil -Return -Return ABC=213 DEF=324 -Return ABC=213 DEF=324 -Return ABC=213 DEF=324 FTPPASSWORD=******** diff --git a/library/system/testsuite/tests/kernel.rb b/library/system/testsuite/tests/kernel.rb deleted file mode 100644 index 7b2f34f69..000000000 --- a/library/system/testsuite/tests/kernel.rb +++ /dev/null @@ -1,108 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: -# initrd.ycp -# -# Module: -# Bootloader -# -# Summary: -# testsuite for initrd module -# -# Authors: -# Jiri Srain -# -# $Id$ -# - -# testedfiles: Kernel.ycp Testsuite.ycp -module Yast - class KernelClient < Client - def main - Yast.include self, "testsuite.rb" - - # minimal "don't care" SCR data to work with the constructor - @READ = - # "etc" : $[ - # "install_inf" : $[ - # "InstMode" : "", - # ], - # ], - { - "sysconfig" => { - "kernel" => { "MODULES_LOADED_ON_BOOT" => "reiserfs xfs" } - }, - "probe" => { - "architecture" => "i386", - "has_pcmcia" => false, - "has_smp" => false, - "system" => nil, - "is_uml" => false, - "memory" => [] - }, - "proc" => { - "cpuinfo" => { "value" => { "0" => { "flags" => "" } } } - }, - "target" => { "tmpdir" => "/tmp" } - } - @WRITE = {} - @EXEC = {} - - TESTSUITE_INIT([@READ, {}, {}], 0) - - Yast.import "Kernel" - Yast.import "Mode" - - Mode.SetTest("testsuite") - - # test behavior of modules loaded on boot - DUMP("----------------------------------------") - - TEST(->() { Kernel.HidePasswords(nil) }, [@READ, @WRITE, @EXEC], 0) - TEST(->() { Kernel.HidePasswords("") }, [@READ, @WRITE, @EXEC], 0) - TEST(->() { Kernel.HidePasswords("ABC=213 DEF=324") }, - [ - @READ, - @WRITE, - @EXEC - ], 0) - TEST(->() { Kernel.HidePasswords(" ABC=213 DEF=324 ") }, - [ - @READ, - @WRITE, - @EXEC - ], 0) - TEST(->() { Kernel.HidePasswords("ABC=213 DEF=324 FTPPASSWORD=pass") }, - [ - @READ, - @WRITE, - @EXEC - ], 0) - - nil - end - end -end - -Yast::KernelClient.new.main diff --git a/library/systemd/Makefile.am b/library/systemd/Makefile.am deleted file mode 100644 index b4b5bc309..000000000 --- a/library/systemd/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = src test diff --git a/library/systemd/src/Makefile.am b/library/systemd/src/Makefile.am deleted file mode 100644 index df7d00213..000000000 --- a/library/systemd/src/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -ylibdir = @ylibdir@/yast2 -ylib_DATA = \ - lib/yast2/compound_service.rb \ - lib/yast2/service_widget.rb \ - lib/yast2/systemctl.rb \ - lib/yast2/system_service.rb \ - lib/yast2/systemd.rb - -systemddir = @ylibdir@/yast2/systemd -systemd_DATA = \ - lib/yast2/systemd/unit.rb \ - lib/yast2/systemd/unit_prop_map.rb \ - lib/yast2/systemd/unit_properties.rb \ - lib/yast2/systemd/unit_installation_properties.rb \ - lib/yast2/systemd/service.rb \ - lib/yast2/systemd/socket.rb \ - lib/yast2/systemd/target.rb \ - lib/yast2/systemd/socket_finder.rb - -module_DATA = \ - modules/Service.rb \ - modules/ServicesProposal.rb \ - modules/Systemd.rb - -EXTRA_DIST = $(ylib_DATA) $(systemd_DATA) $(module_DATA) - -include $(top_srcdir)/Makefile.am.common diff --git a/library/systemd/test/Makefile.am b/library/systemd/test/Makefile.am deleted file mode 100644 index df33671b0..000000000 --- a/library/systemd/test/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -TESTS = \ - services_proposal_test.rb \ - service_test.rb \ - yast2/compound_service_test.rb \ - yast2/service_widget_test.rb \ - yast2/systemctl_test.rb \ - yast2/systemd_service_test.rb \ - yast2/systemd_socket_finder_test.rb \ - yast2/systemd_socket_test.rb \ - yast2/systemd_target_test.rb \ - yast2/systemd_unit_test.rb \ - yast2/system_service_test.rb \ - yast2/unit_properties_test.rb - -EXTRA_DIST = $(TESTS) diff --git a/library/systemd/testsuite/Makefile.am b/library/systemd/testsuite/Makefile.am deleted file mode 100644 index e85fbc827..000000000 --- a/library/systemd/testsuite/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff --git a/library/systemd/testsuite/tests/Systemd.err b/library/systemd/testsuite/tests/Systemd.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/systemd/testsuite/tests/Systemd.out b/library/systemd/testsuite/tests/Systemd.out deleted file mode 100644 index 21310fa09..000000000 --- a/library/systemd/testsuite/tests/Systemd.out +++ /dev/null @@ -1,28 +0,0 @@ -Dump Systemd::Running() tests -Read .target.stat "/sys/fs/cgroup/systemd" $[] -Return false -Read .target.stat "/sys/fs/cgroup/systemd" $["isdir":true] -Return true -Dump Systemd::SetDefaultRunlevel() tests -Log Invalid default runlevel (must be in range 0..6): nil -Return false -Log Invalid default runlevel (must be in range 0..6): -1 -Return false -Log Invalid default runlevel (must be in range 0..6): 7 -Return false -Execute .target.bash "/bin/ln -s -f /usr/lib/systemd/system/runlevel3.target /etc/systemd/system/default.target" 0 -Return true -Execute .target.bash "/bin/ln -s -f /usr/lib/systemd/system/runlevel5.target /etc/systemd/system/default.target" 0 -Return true -Execute .target.bash "/bin/ln -s -f /usr/lib/systemd/system/runlevel5.target /etc/systemd/system/default.target" 1 -Return false -Dump Systemd::DefaultRunlevel() tests -Read .target.symlink "/etc/systemd/system/default.target" nil -Log Cannot read symlink target of /etc/systemd/system/default.target -Return nil -Read .target.symlink "/etc/systemd/system/default.target" "/lib/systemd/system/runlevel3.target" -Return 3 -Read .target.symlink "/etc/systemd/system/default.target" "/lib/systemd/system/graphical.target" -Return 5 -Read .target.symlink "/etc/systemd/system/default.target" "/lib/systemd/system/unknown_default.target" -Return nil diff --git a/library/systemd/testsuite/tests/Systemd.rb b/library/systemd/testsuite/tests/Systemd.rb deleted file mode 100644 index a6494fb78..000000000 --- a/library/systemd/testsuite/tests/Systemd.rb +++ /dev/null @@ -1,147 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class SystemdClient < Client - def main - Yast.import "Systemd" - Yast.include self, "testsuite.rb" - - DUMP("Systemd::Running() tests") - - # Note: \0 should be used here as the separator, but YCP does not allows that... - - # test standard System V init - TEST(->() { Systemd.Running }, [{ "target" => { "stat" => {} } }, {}, {}], nil) - - # systemd - TEST( - ->() { Systemd.Running }, - [{ "target" => { "stat" => { "isdir" => true } } }, {}, {}], - nil - ) - - DUMP("Systemd::SetDefaultRunlevel() tests") - - # test invalid parameters - TEST(->() { Systemd.SetDefaultRunlevel(nil) }, - [ - {}, - {}, - { "target" => { "bash" => 0 } } - ], nil) - - TEST(->() { Systemd.SetDefaultRunlevel(-1) }, - [ - {}, - {}, - { "target" => { "bash" => 0 } } - ], nil) - - TEST(->() { Systemd.SetDefaultRunlevel(7) }, - [ - {}, - {}, - { "target" => { "bash" => 0 } } - ], nil) - - # test valid parameters - TEST(->() { Systemd.SetDefaultRunlevel(3) }, - [ - {}, - {}, - { "target" => { "bash" => 0 } } - ], nil) - - TEST(->() { Systemd.SetDefaultRunlevel(5) }, - [ - {}, - {}, - { "target" => { "bash" => 0 } } - ], nil) - - # test failure - TEST(->() { Systemd.SetDefaultRunlevel(5) }, - [ - {}, - {}, - { "target" => { "bash" => 1 } } - ], nil) - - DUMP("Systemd::DefaultRunlevel() tests") - - # test missing / invalid (not a symlink) default - TEST(->() { Systemd.DefaultRunlevel }, - [ - { "target" => { "symlink" => nil } }, - {}, - {} - ], nil) - - # test numeric runlevel - TEST( - ->() { Systemd.DefaultRunlevel }, - [ - { - "target" => { "symlink" => "/lib/systemd/system/runlevel3.target" } - }, - {}, - {} - ], - nil - ) - - # test symbolic runlevel - TEST( - ->() { Systemd.DefaultRunlevel }, - [ - { - "target" => { "symlink" => "/lib/systemd/system/graphical.target" } - }, - {}, - {} - ], - nil - ) - - # test unknown symbolic runlevel - TEST( - ->() { Systemd.DefaultRunlevel }, - [ - { - "target" => { - "symlink" => "/lib/systemd/system/unknown_default.target" - } - }, - {}, - {} - ], - nil - ) - - nil - end - end -end - -Yast::SystemdClient.new.main diff --git a/library/types/Makefile.am b/library/types/Makefile.am deleted file mode 100644 index 19515d311..000000000 --- a/library/types/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# -# Makefile.am for yast2/library/types -# - -SUBDIRS = src testsuite test diff --git a/library/types/src/Makefile.am b/library/types/src/Makefile.am deleted file mode 100644 index 027929d69..000000000 --- a/library/types/src/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/TypeRepository.rb \ - modules/Netmask.rb \ - modules/IP.rb \ - modules/Map.rb \ - modules/URL.rb \ - modules/RichText.rb \ - modules/String.rb \ - modules/Address.rb \ - modules/Integer.rb \ - modules/Punycode.rb \ - modules/Hostname.rb \ - modules/URLRecode.rb - -EXTRA_DIST = $(module_DATA) - -include $(top_srcdir)/Makefile.am.common diff --git a/library/types/test/Makefile.am b/library/types/test/Makefile.am deleted file mode 100644 index 35f9badcf..000000000 --- a/library/types/test/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -TESTS = \ - hostname_test.rb \ - ip_test.rb \ - ipv4_netmask_test.rb \ - punycode_test.rb \ - string_test.rb \ - type_repository_test.rb \ - url_test.rb \ - urlrecode_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS) diff --git a/library/types/testsuite/Makefile.am b/library/types/testsuite/Makefile.am deleted file mode 100644 index e85fbc827..000000000 --- a/library/types/testsuite/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff --git a/library/types/testsuite/tests/Address.err b/library/types/testsuite/tests/Address.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/types/testsuite/tests/Address.out b/library/types/testsuite/tests/Address.out deleted file mode 100644 index 78570d3c1..000000000 --- a/library/types/testsuite/tests/Address.out +++ /dev/null @@ -1,6 +0,0 @@ -Read .target.tmpdir "/tmp" -Dump Address::Check -Return false -Return false -Return true -Return true diff --git a/library/types/testsuite/tests/Address.rb b/library/types/testsuite/tests/Address.rb deleted file mode 100644 index 31c815e89..000000000 --- a/library/types/testsuite/tests/Address.rb +++ /dev/null @@ -1,45 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class AddressClient < Client - def main - Yast.include self, "testsuite.rb" - - @READ = { "target" => { "tmpdir" => "/tmp" } } - TESTSUITE_INIT([@READ], nil) - - Yast.import "Address" - - DUMP("Address::Check") - TEST(->() { Address.Check(nil) }, [@READ], nil) - TEST(->() { Address.Check("") }, [@READ], nil) - TEST(->() { Address.Check("1.2.3.4") }, [@READ], nil) - TEST(->() { Address.Check("::1") }, [@READ], nil) - - nil - end - end -end - -Yast::AddressClient.new.main diff --git a/library/types/testsuite/tests/Hostname.err b/library/types/testsuite/tests/Hostname.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/types/testsuite/tests/Hostname.out b/library/types/testsuite/tests/Hostname.out deleted file mode 100644 index c258a78d1..000000000 --- a/library/types/testsuite/tests/Hostname.out +++ /dev/null @@ -1,45 +0,0 @@ -Read .target.tmpdir "/tmp" -Dump Hostname::Check -Return false -Return false -Return false -Return false -Return false -Return false -Return false -Dump ---------- -Return true -Return true -Return true -Return true -Return true -Return true -Return false -Return true -Dump Hostname::CheckFQ -Return true -Return true -Dump Hostname::CheckDomain -Return false -Return false -Return true -Return false -Return false -Return false -Return false -Return false -Return false -Dump ---------- -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Dump Hostname::SplitFQ -Return ["ftp", "suse.cz"] -Return ["123", "com"] -Return ["beholder", ""] diff --git a/library/types/testsuite/tests/Hostname.rb b/library/types/testsuite/tests/Hostname.rb deleted file mode 100644 index e515cb07e..000000000 --- a/library/types/testsuite/tests/Hostname.rb +++ /dev/null @@ -1,93 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class HostnameClient < Client - def main - Yast.include self, "testsuite.rb" - @READ = { "target" => { "tmpdir" => "/tmp" } } - TESTSUITE_INIT([@READ], nil) - Yast.import "Hostname" - - DUMP("Hostname::Check") - TEST(->() { Hostname.Check(nil) }, [], nil) - TEST(->() { Hostname.Check("") }, [], nil) - TEST(->() { Hostname.Check("A_B87126") }, [], nil) - TEST(->() { Hostname.Check("ahoj.joha") }, [], nil) - TEST(->() { Hostname.Check("ahoj joha") }, [], nil) - TEST(lambda do - Hostname.Check( - "ABC-012345678901234567890123456789012345678901234567890123456789" - ) - end, [], nil) - TEST(->() { Hostname.Check("----------") }, [], nil) - DUMP("----------") - TEST(->() { Hostname.Check("8abc") }, [], nil) - TEST(->() { Hostname.Check("ahoj") }, [], nil) - TEST(->() { Hostname.Check("aHoJ") }, [], nil) - TEST(->() { Hostname.Check("A-B87126") }, [], nil) - TEST(->() { Hostname.Check("A0123456789") }, [], nil) - TEST(lambda do - Hostname.Check( - "AB-012345678901234567890123456789012345678901234567890123456789" - ) - end, [], nil) - TEST(->() { Hostname.Check("abc-") }, [], nil) - TEST(->() { Hostname.Check("123") }, [], nil) - - DUMP("Hostname::CheckFQ") - TEST(->() { Hostname.CheckFQ("www.blah.com") }, [], nil) - TEST(->() { Hostname.CheckFQ("123.com") }, [], nil) - - DUMP("Hostname::CheckDomain") - TEST(->() { Hostname.CheckDomain(nil) }, [], nil) - TEST(->() { Hostname.CheckDomain("") }, [], nil) - TEST(->() { Hostname.CheckDomain("ww.asda.") }, [], nil) - TEST(->() { Hostname.CheckDomain(".asd.asd.com") }, [], nil) - TEST(->() { Hostname.CheckDomain("www.a sd.com") }, [], nil) - TEST(->() { Hostname.CheckDomain("dsf.234") }, [], nil) - TEST(->() { Hostname.CheckDomain("dsf.4com") }, [], nil) - TEST(->() { Hostname.CheckDomain("asd-.com") }, [], nil) - TEST(->() { Hostname.CheckDomain("----------") }, [], nil) - DUMP("----------") - TEST(->() { Hostname.CheckDomain("A.B") }, [], nil) - TEST(->() { Hostname.CheckDomain("www.blah.com") }, [], nil) - TEST(->() { Hostname.CheckDomain("as.cca.da3.cdd222.cd-2s.com") }, [], nil) - TEST(->() { Hostname.CheckDomain("www.a-sd.com") }, [], nil) - TEST(->() { Hostname.CheckDomain("asdf.2234-dsf.com") }, [], nil) - TEST(->() { Hostname.CheckDomain("12-34.56-78.com") }, [], nil) - TEST(->() { Hostname.CheckDomain("123.com") }, [], nil) - TEST(->() { Hostname.CheckDomain("4com") }, [], nil) - TEST(->() { Hostname.CheckDomain("doncom") }, [], nil) - - DUMP("Hostname::SplitFQ") - TEST(->() { Hostname.SplitFQ("ftp.suse.cz") }, [], nil) - TEST(->() { Hostname.SplitFQ("123.com") }, [], nil) - TEST(->() { Hostname.SplitFQ("beholder") }, [], nil) - - nil - end - end -end - -Yast::HostnameClient.new.main diff --git a/library/types/testsuite/tests/IP.err b/library/types/testsuite/tests/IP.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/types/testsuite/tests/IP.out b/library/types/testsuite/tests/IP.out deleted file mode 100644 index 4e10ae330..000000000 --- a/library/types/testsuite/tests/IP.out +++ /dev/null @@ -1,58 +0,0 @@ -Dump IP::UndecorateIPv6 -Return fe80::219:d1ff:feac:fd10 -Return ::1 -Return fe80::3 -Return fe80::3 -Dump IP::ComputeNetwork -Return 127.0.0.0 -Return 192.168.110.0 -Return 10.20.0.0 -Dump IP::ComputeBroadcast -Return 127.255.255.255 -Return 192.168.110.255 -Return 10.20.15.255 -Dump IP::CheckNetwork4 -> true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Dump IP::CheckNetwork4 -> false -Return false -Return false -Return false -Return false -Return false -Return false -Dump IP::CheckNetwork6 -> true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Dump IP::CheckNetwork6 -> false -Return false -Return false -Return false -Return false -Return false -Return false -Dump IP::CheckNetwork -> true -Return true -Return true -Return true -Return true -Dump IP::CheckNetwork -> false -Return false -Return false -Return false -Return false diff --git a/library/types/testsuite/tests/IP.rb b/library/types/testsuite/tests/IP.rb deleted file mode 100644 index 06c5ea397..000000000 --- a/library/types/testsuite/tests/IP.rb +++ /dev/null @@ -1,104 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class IPClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "IP" - - DUMP("IP::UndecorateIPv6") - TEST(IP.UndecorateIPv6("fe80::219:d1ff:feac:fd10"), [], nil) - TEST(IP.UndecorateIPv6("[::1]"), [], nil) - TEST(IP.UndecorateIPv6("fe80::3%eth0"), [], nil) - TEST(IP.UndecorateIPv6("[fe80::3%eth0]"), [], nil) - - DUMP("IP::ComputeNetwork") - TEST(->() { IP.ComputeNetwork("127.0.0.1", "255.0.0.0") }, [], nil) - TEST(->() { IP.ComputeNetwork("192.168.110.23", "255.255.255.0") }, [], nil) - TEST(->() { IP.ComputeNetwork("10.20.1.29", "255.255.240.0") }, [], nil) - - DUMP("IP::ComputeBroadcast") - TEST(->() { IP.ComputeBroadcast("127.0.0.1", "255.0.0.0") }, [], nil) - TEST(->() { IP.ComputeBroadcast("192.168.110.23", "255.255.255.0") }, [], nil) - TEST(->() { IP.ComputeBroadcast("10.20.1.29", "255.255.240.0") }, [], nil) - - DUMP("IP::CheckNetwork4 -> true") - TEST(->() { IP.CheckNetwork4("192.168.0.1") }, [], nil) - TEST(->() { IP.CheckNetwork4("192.168.0.255") }, [], nil) - TEST(->() { IP.CheckNetwork4("192.168.0.1/20") }, [], nil) - TEST(->() { IP.CheckNetwork4("192.168.0.255/32") }, [], nil) - TEST(->() { IP.CheckNetwork4("192.168.0.1/255.240.0.0") }, [], nil) - TEST(->() { IP.CheckNetwork4("192.168.0.255/255.255.255.255") }, [], nil) - TEST(->() { IP.CheckNetwork4("192.168.0.1/0") }, [], nil) - TEST(->() { IP.CheckNetwork4("172.55.0.0/1") }, [], nil) - TEST(->() { IP.CheckNetwork4("0/0") }, [], nil) - TEST(->() { IP.CheckNetwork4("255.255.255.255/255.255.255.255") }, [], nil) - - DUMP("IP::CheckNetwork4 -> false") - TEST(->() { IP.CheckNetwork4("") }, [], nil) - TEST(->() { IP.CheckNetwork4("172.55.0.0/33") }, [], nil) - TEST(->() { IP.CheckNetwork4("256.168.0.255") }, [], nil) - TEST(->() { IP.CheckNetwork4("172.55.0.0/125.85.5.5") }, [], nil) - TEST(->() { IP.CheckNetwork4("192.168.0.255/5.5.5") }, [], nil) - TEST(->() { IP.CheckNetwork4("192.168.0.255/255.255.0.255") }, [], nil) - - DUMP("IP::CheckNetwork6 -> true") - TEST(->() { IP.CheckNetwork6("FE80:0000:0000:0000:0202:B3FF:FE1E:8329") }, [], nil) - TEST(->() { IP.CheckNetwork6("2001:db8:0::1") }, [], nil) - TEST(->() { IP.CheckNetwork6("2000::/3") }, [], nil) - TEST(->() { IP.CheckNetwork6("2001:db8:0::1/56") }, [], nil) - TEST(->() { IP.CheckNetwork6("2001:db8:0::1/64") }, [], nil) - TEST(->() { IP.CheckNetwork6("2001:db8:0::1/ffff::0") }, [], nil) - TEST(->() { IP.CheckNetwork6("2001:db8:0::1/ffff:ffff::0") }, [], nil) - TEST(->() { IP.CheckNetwork6("::1/128") }, [], nil) - TEST(->() { IP.CheckNetwork6("0/0") }, [], nil) - - DUMP("IP::CheckNetwork6 -> false") - TEST(->() { IP.CheckNetwork6("") }, [], nil) - TEST(lambda do - IP.CheckNetwork6("FE80:0000:0000:0000:0202:B3FF:FE1E:8329:0000") - end, [], nil) - TEST(->() { IP.CheckNetwork6("2001:db8:0::xyz") }, [], nil) - TEST(->() { IP.CheckNetwork6("::1/257") }, [], nil) - TEST(->() { IP.CheckNetwork6("::1/") }, [], nil) - TEST(->() { IP.CheckNetwork6("2001:db8:0::1/ffff:xyz::0") }, [], nil) - - DUMP("IP::CheckNetwork -> true") - TEST(->() { IP.CheckNetwork("192.168.0.1") }, [], nil) - TEST(->() { IP.CheckNetwork("172.55.0.0/1") }, [], nil) - TEST(->() { IP.CheckNetwork("2001:db8:0::1") }, [], nil) - TEST(->() { IP.CheckNetwork("2001:db8:0::1/ffff::0") }, [], nil) - - DUMP("IP::CheckNetwork -> false") - TEST(->() { IP.CheckNetwork("256.168.0.255") }, [], nil) - TEST(->() { IP.CheckNetwork("192.168.0.255/5.5.5") }, [], nil) - TEST(->() { IP.CheckNetwork("2001:db8:0::xyz") }, [], nil) - TEST(->() { IP.CheckNetwork("2001:db8:0::1/ffff:xyz::0") }, [], nil) - - nil - end - end -end - -Yast::IPClient.new.main diff --git a/library/types/testsuite/tests/IPvalidation.err b/library/types/testsuite/tests/IPvalidation.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/types/testsuite/tests/IPvalidation.out b/library/types/testsuite/tests/IPvalidation.out deleted file mode 100644 index f0391461a..000000000 --- a/library/types/testsuite/tests/IPvalidation.out +++ /dev/null @@ -1,4 +0,0 @@ -Read .target.tmpdir "/tmp" -Return true -Return false -Return true diff --git a/library/types/testsuite/tests/IPvalidation.rb b/library/types/testsuite/tests/IPvalidation.rb deleted file mode 100644 index 98a30970d..000000000 --- a/library/types/testsuite/tests/IPvalidation.rb +++ /dev/null @@ -1,53 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: IPvalidation.ycp -# Package: yast2 -# Summary: ipaddress type validation test -# Author: Stanislav Visnovsky -# -# $Id$ -module Yast - class IPvalidationClient < Client - def main - Yast.include self, "testsuite.rb" - @READ = { "target" => { "tmpdir" => "/tmp" } } - TESTSUITE_INIT([@READ], nil) - - Yast.import "TypeRepository" - - # correct IPv4 - TEST(->() { TypeRepository.is_a("10.20.0.0", "ip") }, [], nil) - # incorrect IPv4 - TEST(->() { TypeRepository.is_a("10.blem.0.0", "ip") }, [], nil) - # correct IPv6 - TEST(->() { TypeRepository.is_a("fe80::250:fcff:fe74:f702", "ip") }, [], nil) - - # EOF - - nil - end - end -end - -Yast::IPvalidationClient.new.main diff --git a/library/types/testsuite/tests/Integer.err b/library/types/testsuite/tests/Integer.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/types/testsuite/tests/Integer.out b/library/types/testsuite/tests/Integer.out deleted file mode 100644 index c12385a7e..000000000 --- a/library/types/testsuite/tests/Integer.out +++ /dev/null @@ -1,35 +0,0 @@ -Dump Integer::Range -Return [] -Return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] -Dump Integer::RangeFrom -Return [5, 6, 7, 8, 9] -Dump Integer::IsPowerOfTwo -Return false -Return true -Return true -Return false -Return true -Return false -Return true -Return false -Return false -Return true -Return false -Dump Integer::Sum -Return 0 -Return 1 -Return 5 -Dump Integer::Min -Return 1 -Return 1 -Return 1 -Dump Integer::Max -Return 1 -Return 2 -Return 2 -Dump Integer::Clamp -Return 2 -Return 2 -Return 3 -Return 4 -Return 4 diff --git a/library/types/testsuite/tests/Integer.rb b/library/types/testsuite/tests/Integer.rb deleted file mode 100644 index 0ea0b7cb0..000000000 --- a/library/types/testsuite/tests/Integer.rb +++ /dev/null @@ -1,79 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class IntegerClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Integer" - - DUMP("Integer::Range") - TEST(->() { Integer.Range(0) }, [], nil) - TEST(->() { Integer.Range(10) }, [], nil) - - DUMP("Integer::RangeFrom") - TEST(->() { Integer.RangeFrom(5, 10) }, [], nil) - - DUMP("Integer::IsPowerOfTwo") - TEST(->() { Integer.IsPowerOfTwo(0) }, [], nil) - TEST(->() { Integer.IsPowerOfTwo(1) }, [], nil) - TEST(->() { Integer.IsPowerOfTwo(2) }, [], nil) - TEST(->() { Integer.IsPowerOfTwo(3) }, [], nil) - TEST(->() { Integer.IsPowerOfTwo(4) }, [], nil) - - TEST(->() { Integer.IsPowerOfTwo(1024 - 1) }, [], nil) - TEST(->() { Integer.IsPowerOfTwo(1024) }, [], nil) - TEST(->() { Integer.IsPowerOfTwo(1024 + 1) }, [], nil) - - TEST(->() { Integer.IsPowerOfTwo(1024 * 1024 * 1024 * 1024 - 1) }, [], nil) - TEST(->() { Integer.IsPowerOfTwo(1024 * 1024 * 1024 * 1024) }, [], nil) - TEST(->() { Integer.IsPowerOfTwo(1024 * 1024 * 1024 * 1024 + 1) }, [], nil) - - DUMP("Integer::Sum") - TEST(->() { Integer.Sum([]) }, [], nil) - TEST(->() { Integer.Sum([1]) }, [], nil) - TEST(->() { Integer.Sum([2, 3]) }, [], nil) - - DUMP("Integer::Min") - TEST(->() { Integer.Min([1]) }, [], nil) - TEST(->() { Integer.Min([1, 2]) }, [], nil) - TEST(->() { Integer.Min([2, 1]) }, [], nil) - - DUMP("Integer::Max") - TEST(->() { Integer.Max([1]) }, [], nil) - TEST(->() { Integer.Max([1, 2]) }, [], nil) - TEST(->() { Integer.Max([2, 1]) }, [], nil) - - DUMP("Integer::Clamp") - TEST(->() { Integer.Clamp(1, 2, 4) }, [], nil) - TEST(->() { Integer.Clamp(2, 2, 4) }, [], nil) - TEST(->() { Integer.Clamp(3, 2, 4) }, [], nil) - TEST(->() { Integer.Clamp(4, 2, 4) }, [], nil) - TEST(->() { Integer.Clamp(5, 2, 4) }, [], nil) - - nil - end - end -end - -Yast::IntegerClient.new.main diff --git a/library/types/testsuite/tests/Map.err b/library/types/testsuite/tests/Map.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/types/testsuite/tests/Map.out b/library/types/testsuite/tests/Map.out deleted file mode 100644 index 0d967667a..000000000 --- a/library/types/testsuite/tests/Map.out +++ /dev/null @@ -1,66 +0,0 @@ -Dump Map::Keys -Return [] -Return [] -Return [1] -Return ["2"] -Return [`x] -Return [1, 3] -Dump Map::Values -Return [] -Return [] -Return [2] -Return [3] -Return [4] -Return [2, 4] -Dump Map::KeysToLower -Return $[] -Return $[] -Return $["a":1] -Return $["a":1] -Return $["a":1, "b":1] -Dump Map::KeysToUpper -Return $[] -Return $[] -Return $["A":1] -Return $["A":1] -Return $["A":1, "B":1] -Dump Map::CheckKeys -Return false -Log Missing key: 1 -Return false -Log Missing key: nil -Return false -Return true -Log Missing key: 2 -Return false -Log Missing key: 1 -Return false -Return true -Return true -Log Missing key: `y -Return false -Log Missing key: 1 -Return false -Return true -Return true -Return true -Log Missing key: 2 -Return false -Log Missing key: 4 -Log Missing key: 5 -Return false -Log Missing key: 2 -Return false -Log Missing key: `x -Return false -Dump Map::ToString -Return -Return -Return io=0x340 -Return io=0x340 irq=9 -Dump Map::FromString -Return $[] -Return $[] -Return $[] -Return $["io":"0x340"] -Return $["io":"0x340", "irq":"9"] diff --git a/library/types/testsuite/tests/Map.rb b/library/types/testsuite/tests/Map.rb deleted file mode 100644 index b7f8393cb..000000000 --- a/library/types/testsuite/tests/Map.rb +++ /dev/null @@ -1,97 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class MapClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Map" - - DUMP("Map::Keys") - TEST(->() { Map.Keys(nil) }, [], nil) - TEST(->() { Map.Keys({}) }, [], nil) - TEST(->() { Map.Keys(1 => 2) }, [], nil) - TEST(->() { Map.Keys("2" => 3) }, [], nil) - TEST(->() { Map.Keys(x: 4) }, [], nil) - TEST(->() { Map.Keys(1 => 2, 3 => 4) }, [], nil) - - DUMP("Map::Values") - TEST(->() { Map.Values(nil) }, [], nil) - TEST(->() { Map.Values({}) }, [], nil) - TEST(->() { Map.Values(1 => 2) }, [], nil) - TEST(->() { Map.Values("2" => 3) }, [], nil) - TEST(->() { Map.Values(x: 4) }, [], nil) - TEST(->() { Map.Values(1 => 2, 3 => 4) }, [], nil) - - DUMP("Map::KeysToLower") - TEST(->() { Map.KeysToLower(nil) }, [], nil) - TEST(->() { Map.KeysToLower({}) }, [], nil) - TEST(->() { Map.KeysToLower("a" => 1) }, [], nil) - TEST(->() { Map.KeysToLower("A" => 1) }, [], nil) - TEST(->() { Map.KeysToLower("A" => 1, "b" => 1) }, [], nil) - - DUMP("Map::KeysToUpper") - TEST(->() { Map.KeysToUpper(nil) }, [], nil) - TEST(->() { Map.KeysToUpper({}) }, [], nil) - TEST(->() { Map.KeysToUpper("a" => 1) }, [], nil) - TEST(->() { Map.KeysToUpper("A" => 1) }, [], nil) - TEST(->() { Map.KeysToUpper("A" => 1, "b" => 1) }, [], nil) - - DUMP("Map::CheckKeys") - TEST(->() { Map.CheckKeys(nil, [1]) }, [], nil) - TEST(->() { Map.CheckKeys({}, [1]) }, [], nil) - TEST(->() { Map.CheckKeys({ 1 => 2 }, [nil]) }, [], nil) - TEST(->() { Map.CheckKeys({ 1 => 2 }, [1]) }, [], nil) - TEST(->() { Map.CheckKeys({ 1 => 2 }, [2]) }, [], nil) - TEST(->() { Map.CheckKeys({ "2" => 3 }, [1]) }, [], nil) - TEST(->() { Map.CheckKeys({ "2" => 3 }, ["2"]) }, [], nil) - TEST(->() { Map.CheckKeys({ x: 4 }, [:x]) }, [], nil) - TEST(->() { Map.CheckKeys({ x: 4 }, [:y]) }, [], nil) - TEST(->() { Map.CheckKeys({ x: 4 }, [1]) }, [], nil) - TEST(->() { Map.CheckKeys({ 1 => 2, 3 => 4 }, [1]) }, [], nil) - TEST(->() { Map.CheckKeys({ 1 => 2, 3 => 4 }, [1, 3]) }, [], nil) - TEST(->() { Map.CheckKeys({ 1 => 2, 3 => 4 }, [3, 1]) }, [], nil) - TEST(->() { Map.CheckKeys({ 1 => 2, 3 => 4 }, [2, 3]) }, [], nil) - TEST(->() { Map.CheckKeys({ 1 => 2, 3 => 4 }, [4, 5]) }, [], nil) - TEST(->() { Map.CheckKeys({ 1 => 2, 3 => 4 }, [2, 1]) }, [], nil) - TEST(->() { Map.CheckKeys({ 1 => 2, 3 => 4 }, [:x]) }, [], nil) - - DUMP("Map::ToString") - TEST(->() { Map.ToString(nil) }, [], nil) - TEST(->() { Map.ToString({}) }, [], nil) - TEST(->() { Map.ToString("io" => "0x340") }, [], nil) - TEST(->() { Map.ToString("io" => "0x340", "irq" => "9") }, [], nil) - - DUMP("Map::FromString") - TEST(->() { Map.FromString(nil) }, [], nil) - TEST(->() { Map.FromString("") }, [], nil) - TEST(->() { Map.FromString(" ") }, [], nil) - TEST(->() { Map.FromString("io=0x340") }, [], nil) - TEST(->() { Map.FromString("io=0x340 irq=9") }, [], nil) - - nil - end - end -end - -Yast::MapClient.new.main diff --git a/library/types/testsuite/tests/Netmask.err b/library/types/testsuite/tests/Netmask.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/types/testsuite/tests/Netmask.out b/library/types/testsuite/tests/Netmask.out deleted file mode 100644 index a53930440..000000000 --- a/library/types/testsuite/tests/Netmask.out +++ /dev/null @@ -1,116 +0,0 @@ -Dump Netmask::Check4 -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return true -Return false -Return false -Return false -Return false -Return false -Return false -Return true -Return true -Return true -Dump Netmask::Check6 -Return false -Return false -Return false -Return true -Dump Netmask::FromBits -Return 255.255.255.255 -Return 255.255.255.254 -Return 255.255.255.252 -Return 255.255.255.248 -Return 255.255.255.240 -Return 255.255.255.224 -Return 255.255.255.192 -Return 255.255.255.128 -Return 255.255.255.0 -Return 255.255.254.0 -Return 255.255.252.0 -Return 255.255.248.0 -Return 255.255.240.0 -Return 255.255.224.0 -Return 255.255.192.0 -Return 255.255.128.0 -Return 255.255.0.0 -Return 255.254.0.0 -Return 255.252.0.0 -Return 255.248.0.0 -Return 255.240.0.0 -Return 255.224.0.0 -Return 255.192.0.0 -Return 255.128.0.0 -Return 255.0.0.0 -Return 254.0.0.0 -Return 252.0.0.0 -Return 248.0.0.0 -Return 240.0.0.0 -Return 224.0.0.0 -Return 192.0.0.0 -Return 128.0.0.0 -Return 0.0.0.0 -Dump Netmask::ToBits -Return 32 -Return 31 -Return 30 -Return 29 -Return 28 -Return 27 -Return 26 -Return 25 -Return 24 -Return 23 -Return 22 -Return 21 -Return 20 -Return 19 -Return 18 -Return 17 -Return 16 -Return 15 -Return 14 -Return 13 -Return 12 -Return 11 -Return 10 -Return 9 -Return 8 -Return 7 -Return 6 -Return 5 -Return 4 -Return 3 -Return 2 -Return 1 -Return 0 -Return 32 diff --git a/library/types/testsuite/tests/Netmask.rb b/library/types/testsuite/tests/Netmask.rb deleted file mode 100644 index d6a2bc488..000000000 --- a/library/types/testsuite/tests/Netmask.rb +++ /dev/null @@ -1,102 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -module Yast - class NetmaskClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "Netmask" - - DUMP("Netmask::Check4") - TEST(->() { Netmask.Check4("128.0.0.0") }, [], nil) - TEST(->() { Netmask.Check4("192.0.0.0") }, [], nil) - TEST(->() { Netmask.Check4("224.0.0.0") }, [], nil) - TEST(->() { Netmask.Check4("240.0.0.0") }, [], nil) - TEST(->() { Netmask.Check4("248.0.0.0") }, [], nil) - TEST(->() { Netmask.Check4("252.0.0.0") }, [], nil) - TEST(->() { Netmask.Check4("254.0.0.0") }, [], nil) - TEST(->() { Netmask.Check4("255.0.0.0") }, [], nil) - TEST(->() { Netmask.Check4("255.128.0.0") }, [], nil) - TEST(->() { Netmask.Check4("255.192.0.0") }, [], nil) - TEST(->() { Netmask.Check4("255.224.0.0") }, [], nil) - TEST(->() { Netmask.Check4("255.240.0.0") }, [], nil) - TEST(->() { Netmask.Check4("255.248.0.0") }, [], nil) - TEST(->() { Netmask.Check4("255.252.0.0") }, [], nil) - TEST(->() { Netmask.Check4("255.254.0.0") }, [], nil) - TEST(->() { Netmask.Check4("255.255.0.0") }, [], nil) - TEST(->() { Netmask.Check4("255.255.128.0") }, [], nil) - TEST(->() { Netmask.Check4("255.255.192.0") }, [], nil) - TEST(->() { Netmask.Check4("255.255.224.0") }, [], nil) - TEST(->() { Netmask.Check4("255.255.240.0") }, [], nil) - TEST(->() { Netmask.Check4("255.255.248.0") }, [], nil) - TEST(->() { Netmask.Check4("255.255.252.0") }, [], nil) - TEST(->() { Netmask.Check4("255.255.254.0") }, [], nil) - TEST(->() { Netmask.Check4("255.255.255.0") }, [], nil) - TEST(->() { Netmask.Check4("255.255.255.128") }, [], nil) - TEST(->() { Netmask.Check4("255.255.255.192") }, [], nil) - TEST(->() { Netmask.Check4("255.255.255.224") }, [], nil) - TEST(->() { Netmask.Check4("255.255.255.240") }, [], nil) - TEST(->() { Netmask.Check4("255.255.255.248") }, [], nil) - TEST(->() { Netmask.Check4("255.255.255.252") }, [], nil) - TEST(->() { Netmask.Check4("255.255.255.254") }, [], nil) - TEST(->() { Netmask.Check4("255.255.255.255") }, [], nil) - TEST(->() { Netmask.Check4("1.2.3.4") }, [], nil) - TEST(->() { Netmask.Check4("1.A.3.4") }, [], nil) - TEST(->() { Netmask.Check4("0.0.0.0") }, [], nil) - - TEST(->() { Netmask.CheckPrefix4(nil) }, [], nil) - TEST(->() { Netmask.CheckPrefix4("") }, [], nil) - TEST(->() { Netmask.CheckPrefix4("33") }, [], nil) - TEST(->() { Netmask.CheckPrefix4("0") }, [], nil) - TEST(->() { Netmask.CheckPrefix4("24") }, [], nil) - TEST(->() { Netmask.CheckPrefix4("32") }, [], nil) - - DUMP("Netmask::Check6") - TEST(->() { Netmask.Check6(nil) }, [], nil) - TEST(->() { Netmask.Check6("") }, [], nil) - TEST(->() { Netmask.Check6("345") }, [], nil) - TEST(->() { Netmask.Check6("128") }, [], nil) - - @i = nil - DUMP("Netmask::FromBits") - @i = 32 - while Ops.greater_or_equal(@i, 0) - TEST(->() { Netmask.FromBits(@i) }, [], nil) - @i = Ops.subtract(@i, 1) - end - - # this test relies on the previous one - DUMP("Netmask::ToBits") - @i = 32 - while Ops.greater_or_equal(@i, 0) - TEST(->() { Netmask.ToBits(Netmask.FromBits(@i)) }, [], nil) - @i = Ops.subtract(@i, 1) - end - TEST(->() { Netmask.ToBits("") }, [], nil) - - nil - end - end -end - -Yast::NetmaskClient.new.main diff --git a/library/types/testsuite/tests/enumtype.err b/library/types/testsuite/tests/enumtype.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/types/testsuite/tests/enumtype.out b/library/types/testsuite/tests/enumtype.out deleted file mode 100644 index 94a833dff..000000000 --- a/library/types/testsuite/tests/enumtype.out +++ /dev/null @@ -1,4 +0,0 @@ -Read .target.tmpdir "/tmp" -Return true -Return false -Return false diff --git a/library/types/testsuite/tests/enumtype.rb b/library/types/testsuite/tests/enumtype.rb deleted file mode 100644 index 0c6c81d7b..000000000 --- a/library/types/testsuite/tests/enumtype.rb +++ /dev/null @@ -1,50 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: enumtype.ycp -# Package: yast2 -# Summary: enumerated type generic validator test -# Author: Stanislav Visnovsky -# -# $Id$ -module Yast - class EnumtypeClient < Client - def main - Yast.include self, "testsuite.rb" - @READ = { "target" => { "tmpdir" => "/tmp" } } - TESTSUITE_INIT([@READ], nil) - - Yast.import "TypeRepository" - - TEST(->() { TypeRepository.enum_validator(["a", "b", "c"], "a") }, [], nil) - TEST(->() { TypeRepository.enum_validator(["a", "b", "c"], "x") }, [], nil) - TEST(->() { TypeRepository.enum_validator([], "ahoj") }, [], nil) - - # EOF - - nil - end - end -end - -Yast::EnumtypeClient.new.main diff --git a/library/types/testsuite/tests/regextype.err b/library/types/testsuite/tests/regextype.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/types/testsuite/tests/regextype.out b/library/types/testsuite/tests/regextype.out deleted file mode 100644 index 18e317e5d..000000000 --- a/library/types/testsuite/tests/regextype.out +++ /dev/null @@ -1,3 +0,0 @@ -Read .target.tmpdir "/tmp" -Return true -Return false diff --git a/library/types/testsuite/tests/regextype.rb b/library/types/testsuite/tests/regextype.rb deleted file mode 100644 index d0e415e97..000000000 --- a/library/types/testsuite/tests/regextype.rb +++ /dev/null @@ -1,49 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: regextype.ycp -# Package: yast2 -# Summary: regular expression generic validator test -# Author: Stanislav Visnovsky -# -# $Id$ -module Yast - class RegextypeClient < Client - def main - Yast.include self, "testsuite.rb" - @READ = { "target" => { "tmpdir" => "/tmp" } } - TESTSUITE_INIT([@READ], nil) - - Yast.import "TypeRepository" - - TEST(->() { TypeRepository.regex_validator("^[abc]+.*m$", "blem") }, [], nil) - TEST(->() { TypeRepository.regex_validator("^[abc]+.*m$", "blec") }, [], nil) - - # EOF - - nil - end - end -end - -Yast::RegextypeClient.new.main diff --git a/library/types/testsuite/tests/undefinedtype.err b/library/types/testsuite/tests/undefinedtype.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/library/types/testsuite/tests/undefinedtype.out b/library/types/testsuite/tests/undefinedtype.out deleted file mode 100644 index e4703dfc7..000000000 --- a/library/types/testsuite/tests/undefinedtype.out +++ /dev/null @@ -1,3 +0,0 @@ -Read .target.tmpdir "/tmp" -Log Request to validate unknown type blem -Return false diff --git a/library/types/testsuite/tests/undefinedtype.rb b/library/types/testsuite/tests/undefinedtype.rb deleted file mode 100644 index 6790e451f..000000000 --- a/library/types/testsuite/tests/undefinedtype.rb +++ /dev/null @@ -1,49 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: UndefinedType.ycp -# Package: yast2 -# Summary: undefined type validation test -# Author: Stanislav Visnovsky -# -# $Id$ -module Yast - class UndefinedtypeClient < Client - def main - Yast.include self, "testsuite.rb" - @READ = { "target" => { "tmpdir" => "/tmp" } } - TESTSUITE_INIT([@READ], nil) - - Yast.import "TypeRepository" - - # blem is undefined type - TEST(->() { TypeRepository.is_a("10.20.0.0", "blem") }, [], nil) - - # EOF - - nil - end - end -end - -Yast::UndefinedtypeClient.new.main diff --git a/library/wizard/Makefile.am b/library/wizard/Makefile.am deleted file mode 100644 index 621131edf..000000000 --- a/library/wizard/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# -# Makefile.am for yast2/wizard -# - -SUBDIRS = src test diff --git a/library/wizard/doc/examples/Makefile.am b/library/wizard/doc/examples/Makefile.am deleted file mode 100644 index e078bacb7..000000000 --- a/library/wizard/doc/examples/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# -# Makefile.am for y2l_wizard/doc/examples -# - -examplesdir = $(docdir)/wizard/examples - -examples_DATA = $(wildcard *.ycp) $(wildcard start*) - -EXTRA_DIST = $(examples_DATA) diff --git a/library/wizard/doc/screenshots/Makefile.am b/library/wizard/doc/screenshots/Makefile.am deleted file mode 100644 index 10074d6ac..000000000 --- a/library/wizard/doc/screenshots/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# -# Makefile.am for yast2/library/wizard/doc -# - -docdir = @docdir@/wizard -htmldir = $(docdir) - -html_DATA = $(wildcard *.png) -EXTRA_DIST = $(html_DATA) diff --git a/library/wizard/src/Makefile.am b/library/wizard/src/Makefile.am deleted file mode 100644 index 793532acf..000000000 --- a/library/wizard/src/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/Wizard.rb \ - modules/Progress.rb \ - modules/Confirm.rb \ - modules/HTML.rb - -EXTRA_DIST = $(module_DATA) - -include $(top_srcdir)/Makefile.am.common \ No newline at end of file diff --git a/library/wizard/test/Makefile.am b/library/wizard/test/Makefile.am deleted file mode 100644 index b09bad091..000000000 --- a/library/wizard/test/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -TESTS = \ - wizard_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS) test_helper.rb diff --git a/library/xml/Makefile.am b/library/xml/Makefile.am deleted file mode 100644 index cf129cab3..000000000 --- a/library/xml/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# -# Makefile.am for xml/module -# - -SUBDIRS = src diff --git a/library/xml/src/Makefile.am b/library/xml/src/Makefile.am deleted file mode 100644 index 02937e2f9..000000000 --- a/library/xml/src/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# Sources for yast2 - -module_DATA = \ - modules/XML.rb - -EXTRA_DIST = $(module_DATA) - -include $(top_srcdir)/Makefile.am.common \ No newline at end of file diff --git a/package/yast2.changes b/package/yast2.changes index 669a51cc5..9bf5cc3e9 100644 --- a/package/yast2.changes +++ b/package/yast2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 30 12:52:13 UTC 2019 - Josef Reidinger + +- Drop old testsuite +- Convert from autotools to rake based installation + ------------------------------------------------------------------- Fri May 17 11:17:17 CEST 2019 - aschnell@suse.com diff --git a/package/yast2.spec b/package/yast2.spec index 7e9ed4add..f196e25da 100644 --- a/package/yast2.spec +++ b/package/yast2.spec @@ -29,6 +29,8 @@ Source1: yast2-rpmlintrc BuildRequires: fdupes # Needed for tests BuildRequires: grep +# for some system directories +BuildRequires: filesystem BuildRequires: perl-XML-Writer # for defining abstract methods in libraries BuildRequires: rubygem(%{rb_default_ruby_abi}:abstract_method) @@ -45,6 +47,7 @@ BuildRequires: rubygem(%{rb_default_ruby_abi}:simpleidn) BuildRequires: yast2-core >= 2.18.12 BuildRequires: yast2-devtools >= 3.1.10 BuildRequires: yast2-pkg-bindings >= 2.20.3 +BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake) # To have Yast::WFM.scr_root BuildRequires: yast2-ruby-bindings >= 3.2.8 BuildRequires: yast2-testsuite @@ -115,14 +118,14 @@ installation with YaST2 %prep %setup -q +%check +rake test:unit + %build -%yast_build # removed explicit adding of translations to group desktop files, since it is covered by the general call (they are in a subdirectory) and it caused build fail %install -%yast_install - mkdir -p %{buildroot}%{yast_clientdir} mkdir -p %{buildroot}%{yast_desktopdir} mkdir -p %{buildroot}%{yast_imagedir} @@ -139,6 +142,8 @@ mkdir -p %{buildroot}%{yast_schemadir}/control/rnc mkdir -p %{buildroot}%{yast_schemadir}/autoyast/rnc mkdir -p %{buildroot}%{_sysconfdir}/YaST2 +rake install DESTDIR="%{buildroot}" + # symlink the yardoc duplicates, saves over 2MB in installed system # (the RPM package size is decreased just by few kilobytes # because of the compression) @@ -190,6 +195,9 @@ mkdir -p %{buildroot}%{_sysconfdir}/YaST2 # documentation (not included in devel subpackage) %doc %dir %{yast_docdir} %license %{yast_docdir}/COPYING +%doc %{yast_docdir}/CONTRIBUTING.md +%doc %{yast_docdir}/README.md + %{_mandir}/*/* %doc %{yast_vardir}/hooks/README.md diff --git a/scripts/Makefile.am b/scripts/Makefile.am deleted file mode 100644 index 8b830db09..000000000 --- a/scripts/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# -# Makefile.am for yast2/scripts -# - -sbin_SCRIPTS = yast2 save_y2logs - -ybin_SCRIPTS = yast2-funcs - -completiondir = /usr/share/bash-completion/completions/ -completion_DATA = yast2-completion.sh - -EXTRA_DIST = $(sbin_SCRIPTS) $(ybin_SCRIPTS) $(completion_DATA) - -install-data-local: - install -d -m 755 $(DESTDIR)$(ybindir) -# symlink to call yast in ncurses - ln -snf yast2 $(DESTDIR)$(sbindir)/yast -# backward compatibility - install -d -m 755 $(DESTDIR)/sbin - ln -snf $(sbindir)/yast2 $(DESTDIR)/sbin/yast2 - ln -snf $(sbindir)/yast2 $(DESTDIR)/sbin/yast diff --git a/scripts/legacy_sbin/yast b/scripts/legacy_sbin/yast new file mode 120000 index 000000000..a205346f4 --- /dev/null +++ b/scripts/legacy_sbin/yast @@ -0,0 +1 @@ +/usr/sbin/yast2 \ No newline at end of file diff --git a/scripts/legacy_sbin/yast2 b/scripts/legacy_sbin/yast2 new file mode 120000 index 000000000..a205346f4 --- /dev/null +++ b/scripts/legacy_sbin/yast2 @@ -0,0 +1 @@ +/usr/sbin/yast2 \ No newline at end of file diff --git a/scripts/yast b/scripts/yast new file mode 120000 index 000000000..d9a537de1 --- /dev/null +++ b/scripts/yast @@ -0,0 +1 @@ +yast2 \ No newline at end of file diff --git a/test/Makefile.am b/test/Makefile.am deleted file mode 100644 index ad2627462..000000000 --- a/test/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -TESTS = \ - yast2_test.rb - -TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec -VERBOSE = 1 -EXTRA_DIST = $(TESTS)