Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

investigate windows crlf issues #5289

Merged
merged 3 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/windows_acceptance_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- uses: msys2/setup-msys2@v2
with:
install: >-
dos2unix
diffutils
util-linux
python-pip
Expand Down Expand Up @@ -46,9 +47,6 @@ jobs:
- name: run cf-agent
run: "'/c/Program Files/Cfengine/bin/cf-agent.exe' --version"

- name: dummy cf-secret, ENT-10405
run: "touch 'c:/Program Files/Cfengine/bin/cf-secret.exe' && chmod a+x 'c:/Program Files/Cfengine/bin/cf-secret.exe'"

- name: expect an unknown synthax error in packagesmatching.cf, ENT-10422
run: "cd tests/acceptance/01_vars/02_functions/ && mv packagesmatching.cf packagesmatching.x.cf"

Expand Down
1 change: 0 additions & 1 deletion tests/acceptance/.gitattributes

This file was deleted.

4 changes: 0 additions & 4 deletions tests/acceptance/00_basics/01_compiler/string_contexts.cf
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

defaults:
"s1" string => "1";
"s2" string => "2";
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/00_basics/01_compiler/with_iteration.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"probe" string => "0";
"iter" slist => { "1", "2", "3" };
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/00_basics/def.json/state.cf
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
}

#######################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ bundle agent __main__
"bundlesequence" usebundle => default("$(this.promise_filename)");
}

bundle agent init
{
commands:
windows::
"$(G.dos2unix) $(this.promise_dirname)/expected_output.txt" -> { "ENT-10433" };
}

bundle agent test
{
meta:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ bundle agent __main__
"bundlesequence" usebundle => default("$(this.promise_filename)");
}

bundle agent init
{
commands:
windows::
"$(G.dos2unix) $(this.promise_dirname)/expected_output.txt" -> { "ENT-10433" };
}

bundle agent test
{
meta:
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/01_vars/01_basic/this_variables.cf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ bundle agent init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
vars:
"var" slist => { "var in test" };
"var_test" slist => { "var_test in test" };
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/01_vars/02_functions/cf_version.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
vars:
"after_newer" string => "yes",
if => cf_version_after("1.0.0");
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/01_vars/02_functions/data_expand.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
vars:
"x" string => "foo";
"y" int => "200";
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/01_vars/02_functions/every_some_none.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
methods:
"pretest";
"collect";
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/01_vars/02_functions/filter.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
vars:
"tests" slist => { "fgrep09", "exact1", "exactdot", "regexdot", "invert", "max2", "max0", "grep09" };
"lists" slist => { "s1", "d1", "d2", "dempty" };
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/01_vars/02_functions/format_edge_case.cf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ body common control
##########################################################

bundle agent test {
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
vars:
"str" string => format('%s', 'Hello, everyone! This is the LONGEST TEXT EVER! I was inspired by the various other longest texts ever on the internet, and I wanted to make my own. So here it is! This is going to be a WORLD RECORD! This is actually my third attempt at doing this. The first time, I didnt save it. The second time, the Neocities editor crashed. Now Im writing this in Notepad, then copying it into the Neocities editor instead of typing it directly in the Neocities editor to avoid crashing. It sucks that my past two attempts are gone now. Those actually got pretty long. Not the longest, but still pretty long. I hope this one wont get lost somehow. Anyways, lets talk about WAFFLES! I like waffles. Waffles are cool. Waffles is a funny word. Theres a Teen Titans Go episode called Waffles where the word Waffles is said a hundred-something times. Its pretty annoying. Theres also a Teen Titans Go episode about Pig Latin. Dont know what Pig Latin is? Its a language where you take all the consonants before the first vowel, move them to the end, and add -ay to the end. If the word begins with a vowel, you just add -way to the end. For example, Waffles becomes Afflesway. Ive been speaking Pig Latin fluently since the fourth grade, so it surprised me when I saw the episode for the first time. I speak Pig Latin with my sister sometimes. Its pretty fun. I like speaking it in public so that everyone around us gets confused. Thats never actually happened before, but if it ever does, twill be pretty funny. By the way, twill is a word I invented recently, and its a contraction of it will. I really hope it gains popularity in the near future, because twill is WAY more fun than saying itll. Itll is too boring. Nobody likes boring. This is nowhere near being the longest text ever, but eventually it will be! I might still be writing this a decade later, who knows? But right now, its not very long. But Ill just keep writing until it is the longest! Have you ever heard the song Dau Dau by Awesome Scampis? Its an amazing song. Look it up on YouTube! I play that song all the time around my sister! It drives her crazy, and I love it. Another way I like driving my sister crazy is by speaking my own made up language to her. She hates the languages I make! The only language that we both speak besides English is Pig Latin. I think you already knew that. Whatever. I think Im gonna go for now. Bye! Hi, Im back now. Im gonna contribute more to this soon-to-be giant wall of text. I just realised I have a giant stuffed frog on my bed. I forgot his name. Im pretty sure it was something stupid though. I think it was FROG in Morse Code or something. Morse Code is cool. I know a bit of it, but Im not very good at it. Im also not very good at French. I barely know anything in French, and my pronunciation probably sucks. But Im learning it, at least. Im also learning Esperanto. Its this language that was made up by some guy a long time ago to be the universal language. A lot of people speak it. I am such a language nerd. Half of this text is probably gonna be about languages. But hey, as long as its long! Ha, get it? As LONG as its LONG? Im so funny, right? No, Im not. I should probably get some sleep. Goodnight! Hello, Im back again. I basically have only two interests nowadays: languages and furries. What? Oh, sorry, I thought you knew I was a furry. Haha, oops. Anyway, yeah, Im a furry, but since Im a young furry, I cant really do as much as I would like to do in the fandom. When Im older, I would like to have a fursuit, go to furry conventions, all that stuff. But for now I can only dream of that. Sorry you had to deal with me talking about furries, but Im honestly very desperate for this to be the longest text ever. Last night I was watching nothing but fursuit unboxings. I think I need help. This one time, me and my mom were going to go to a furry Christmas party, but we didnt end up going because of the fact that there was alcohol on the premises, and that she didnt wanna have to be a mom dragging her son through a crowd of furries. Both of those reasons were understandable. Okay, hopefully I wont have to talk about furries anymore. I dont care if youre a furry reading this right now, I just dont wanna have to torture everyone else.');
"list" slist => { $(str) };
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/01_vars/02_functions/getindices.cf
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ bundle common b

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
vars:
"user[name]" string => "zamboni";
"user[fullname][first]" string => "Diego";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ bundle agent init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"values_data_1" slist => getindices("init.data[bar]");
"values_data_2" slist => getindices("init.data[zebra][lion]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ bundle agent init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
# expected: one, two
"values_data" slist => getindices("init.data[bar]");
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/gettags.cf
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ bundle common init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"tags1" slist => getclassmetatags("myclass");
"tags2" slist => getclassmetatags("myplainclass");
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/getvalues.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"user[name]" string => "zamboni";
"user[fullname][first]" string => "Diego";
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/getvalues_containers.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ bundle agent init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"arr_v" slist => getvalues("init.arr");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ bundle agent init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"values_data" slist => getvalues("init.data");
"values_data2" slist => getvalues("init.data2");
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/ifelse.cf
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ bundle common init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

classes:
"myclass2" expression => "any";
vars:
Expand Down
2 changes: 0 additions & 2 deletions tests/acceptance/01_vars/02_functions/ifelse_isvariable.cf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ bundle agent test
meta:
"description"
string => "Test that ifelse can use the result of isvariable as a class identifer";
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
# Since init.passwd_file is defined, I expect the value to be
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/inline_json.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"z" string => "100";
"foo" string => "bar";
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/join.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ body common control

bundle agent init
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"a" slist => { "b", "c", "a" };
"b" slist => { "100", "9", "10" };
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/length.cf
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ bundle agent init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"normal_list" slist => { "b", "c", "a" }; # 3
"empty_list" slist => { }; # 0
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/maparray.cf
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ bundle agent init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"load1" data => parsejson('[ 1, 2, 3]');
"load2" slist => { "eleme\"nt1", "element2", "element3" };
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/maparray_multi_index.cf
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ bundle agent init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"bundles[x][y][z1]" string => "xyz1";
"bundles[x][y][z23]" slist => { "xyz2", "xyz3" };
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/maplist.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"testlist" slist => { "zero", "two", "three's", "four-fore:quatre", "last" };
"empty" slist => { };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ bundle agent test
meta:
"description"
string => "Test that plain json strings can be merged";
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"merged" data => mergedata( '[]', '{ "one": "1" }', '{ "two":"2"}' );
Expand Down
2 changes: 0 additions & 2 deletions tests/acceptance/01_vars/02_functions/network/url_get.cf
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ bundle agent test
{
meta:
"test_skip_unsupported" string => "!feature_curl";
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"kept" data => mergedata(
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/nth_datacontainer.cf
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ bundle agent init

bundle common test_common
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"data" data => readjson("$(this.promise_filename).json", "100k");
"datastr" string => format("%S", data);
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/readdata_yaml.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
feature_yaml::
"explicit_yaml" data => readdata("$(this.promise_filename).yaml", "YAML");
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/regex_replace.cf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"test" string => "abcdefghij";

Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/01_vars/02_functions/reverse.cf
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ bundle agent init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };

vars:
"sa" slist => reverse("init.a");
"sb" slist => reverse("init.b");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ bundle agent init

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
vars:
"list1" slist => { "a", "b", "c", "d", "e", "f" };
"list2" slist => { "a", "b", "c", "d", "e", "f" };
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/01_vars/02_functions/storejson.cf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ body common control

bundle agent test
{
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
vars:
"mylist" slist => { "x", "y" };
"data" data => parsejson('{
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/01_vars/02_functions/storejson_edge_case.cf
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ body common control
##########################################################

bundle agent test {
meta:
"test_soft_fail" string => "windows",
meta => { "ENT-10254" };
vars:
"data" string => storejson('{ "A very long text": "Hello, everyone! This is the LONGEST TEXT EVER! I was inspired by the various other longest texts ever on the internet, and I wanted to make my own. So here it is! This is going to be a WORLD RECORD! This is actually my third attempt at doing this. The first time, I didnt save it. The second time, the Neocities editor crashed. Now Im writing this in Notepad, then copying it into the Neocities editor instead of typing it directly in the Neocities editor to avoid crashing. It sucks that my past two attempts are gone now. Those actually got pretty long. Not the longest, but still pretty long. I hope this one wont get lost somehow. Anyways, lets talk about WAFFLES! I like waffles. Waffles are cool. Waffles is a funny word. Theres a Teen Titans Go episode called Waffles where the word Waffles is said a hundred-something times. Its pretty annoying. Theres also a Teen Titans Go episode about Pig Latin. Dont know what Pig Latin is? Its a language where you take all the consonants before the first vowel, move them to the end, and add -ay to the end. If the word begins with a vowel, you just add -way to the end. For example, Waffles becomes Afflesway. Ive been speaking Pig Latin fluently since the fourth grade, so it surprised me when I saw the episode for the first time. I speak Pig Latin with my sister sometimes. Its pretty fun. I like speaking it in public so that everyone around us gets confused. Thats never actually happened before, but if it ever does, twill be pretty funny. By the way, twill is a word I invented recently, and its a contraction of it will. I really hope it gains popularity in the near future, because twill is WAY more fun than saying itll. Itll is too boring. Nobody likes boring. This is nowhere near being the longest text ever, but eventually it will be! I might still be writing this a decade later, who knows? But right now, its not very long. But Ill just keep writing until it is the longest! Have you ever heard the song Dau Dau by Awesome Scampis? Its an amazing song. Look it up on YouTube! I play that song all the time around my sister! It drives her crazy, and I love it. Another way I like driving my sister crazy is by speaking my own made up language to her. She hates the languages I make! The only language that we both speak besides English is Pig Latin. I think you already knew that. Whatever. I think Im gonna go for now. Bye! Hi, Im back now. Im gonna contribute more to this soon-to-be giant wall of text. I just realised I have a giant stuffed frog on my bed. I forgot his name. Im pretty sure it was something stupid though. I think it was FROG in Morse Code or something. Morse Code is cool. I know a bit of it, but Im not very good at it. Im also not very good at French. I barely know anything in French, and my pronunciation probably sucks. But Im learning it, at least. Im also learning Esperanto. Its this language that was made up by some guy a long time ago to be the universal language. A lot of people speak it. I am such a language nerd. Half of this text is probably gonna be about languages. But hey, as long as its long! Ha, get it? As LONG as its LONG? Im so funny, right? No, Im not. I should probably get some sleep. Goodnight! Hello, Im back again. I basically have only two interests nowadays: languages and furries. What? Oh, sorry, I thought you knew I was a furry. Haha, oops. Anyway, yeah, Im a furry, but since Im a young furry, I cant really do as much as I would like to do in the fandom. When Im older, I would like to have a fursuit, go to furry conventions, all that stuff. But for now I can only dream of that. Sorry you had to deal with me talking about furries, but Im honestly very desperate for this to be the longest text ever. Last night I was watching nothing but fursuit unboxings. I think I need help. This one time, me and my mom were going to go to a furry Christmas party, but we didnt end up going because of the fact that there was alcohol on the premises, and that she didnt wanna have to be a mom dragging her son through a crowd of furries. Both of those reasons were understandable. Okay, hopefully I wont have to talk about furries anymore. I dont care if youre a furry reading this right now, I just dont wanna have to torture everyone else."}');
}
Expand Down
Loading
Loading