From 15d71214638c6f7f808b838cfc4215ece0a53101 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 4 Apr 2024 23:32:09 -0300 Subject: fix(build): ensure --force works for build --- spec/quick/build.q | 8 ++++++++ spec/quick/make.q | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) (limited to 'spec') diff --git a/spec/quick/build.q b/spec/quick/build.q index 4d0f6f9f..d0d6a890 100644 --- a/spec/quick/build.q +++ b/spec/quick/build.q @@ -214,6 +214,14 @@ Use --force to reinstall -------------------------------------------------------------------------------- +RUN: luarocks build a_rock-1.0-1.rockspec --force +NOT_STDOUT: +-------------------------------------------------------------------------------- +a_rock 1.0-1 is already installed +Use --force to reinstall +-------------------------------------------------------------------------------- + + ================================================================================ TEST: supports --pin #pinning diff --git a/spec/quick/make.q b/spec/quick/make.q index c77bb499..eb3472b6 100644 --- a/spec/quick/make.q +++ b/spec/quick/make.q @@ -49,3 +49,40 @@ return { } } -------------------------------------------------------------------------------- + + + +================================================================================ +TEST: running make twice builds twice + +FILE: test-2.0-1.rockspec +-------------------------------------------------------------------------------- +package = "test" +version = "2.0-1" +source = { + url = "file://%{path(tmpdir)}/test.lua" +} +build = { + type = "builtin", + modules = { + test = "test.lua" + } +} +-------------------------------------------------------------------------------- + +FILE: test.lua +-------------------------------------------------------------------------------- +return {} +-------------------------------------------------------------------------------- + +RUN: luarocks make --only-server=%{fixtures_dir}/a_repo --pin --tree=lua_modules +STDOUT: +-------------------------------------------------------------------------------- +test 2.0-1 is now installed +-------------------------------------------------------------------------------- + +RUN: luarocks make --only-server=%{fixtures_dir}/a_repo --pin --tree=lua_modules +STDOUT: +-------------------------------------------------------------------------------- +test 2.0-1 is now installed +-------------------------------------------------------------------------------- -- cgit v1.2.3-55-g6feb